HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/posscale/www/epygi/rcci_updateconfig.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
-----------------------------------------------------------------------------
*	.FILE NAME:
*		rcci.php
*	
*	.FUNCTION:
*		Remote Call Control Interface
*
*	.Notice: Set implicit_flush = On in php.ini file
-----------------------------------------------------------------------------
-->
<?php
include "XMLCalls_inc.php";
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Remote Call Control Interface</title>
</head>

<LINK rel="stylesheet" type="text/css" href="styles/styles.css">


<script language='javascript' >
	
	function runUpdate() 
	{
		this.document.forms['call_control'].elements['updconfig'].value="boot";
		this.document.forms['call_control'].submit();
	}

</script>

<center><font size='6' class="title">Remote Call Control Interface</font></center>
<br>

<form name='call_control' method='post' target="_self">

<table class="table_border" align="center">
<tr>
<td class="inp_header" colspan="2" align="center">Connection parameters</td>
</tr>

<tr>
<td class="td_pad">Quadro IP</td>
<td class="td_pad"><input type='text' class="input" name='ip' maxlength='15' size='15' value='<?php echo !empty($_POST['ip']) ? $_POST['ip'] : '';  ?>'></td>

<tr>
<td class="td_pad">Port</td>
<td class="td_pad"><input type='text' class="input" name='port' maxlength='4' size='15'  value='4849'></td>

<tr>
<td class="td_pad">User Name</td>
<td class="td_pad"><input type='text' class="input" name='user_name' maxlength='10' size='15'  value='admin'></td>

<tr>
<td class="td_pad">Password</td>
<td class="td_pad"><input type='password' class="input" name='password' maxlength='10' size='15'  value='19'></td>

<?php
if( !empty($_POST['updconfig']) && ($_POST['updconfig'] == "boot")) {	

	$addr = $_POST['ip'];
	$port = $_POST['port'];
	$user_name = $_POST['user_name'];
	$password = $_POST['password'];	
	
	//echo $addr."---".$port."---".$user_name."---".$password;
	if ( checkConnectFields() )
	{
		$net = new XMLCalls($addr, $port, $user_name, $password );
	
		if( !$net->Authenticate() ) {
			?>
			<tr>
			<td class="td_pad">Connection Status</td>
			<td class="td_pad"><input type='text' class="input" size='35' value='Wrong username or password'></td>
			<?php	
			exit(0);
		} else {
			?>
			<tr>
			<td class="td_pad">Connection Status</td>
			<td class="td_pad"><input type='text' class="input" size='35' value='Connected'></td>
			<?php			
		}
	}		
}
?>

</table>

<br>

<table class="table_border" align="center">
<tr>
<td class="inp_header" colspan="2" align="center">Upload legible configuration </td>
</tr>

<tr>
<td class="td_pad">Filename</td>
 	<td class="td_pad"><input type='text' class="input" name='filename' maxlength='50' size='50'  value=''></td> 

</table>

<br>

<center>
<input type='button'  value='Upload' class="button" onclick="runUpdate()">
</center>

<br>

<input type='hidden' name="updconfig" value="">

</form>

<?php

function checkConnectFields()
{
	if( empty($_POST['ip']) ) {
		?>
		<script language="javascript">
			alert("Please, enter Quadro IP address.");
		</script>
		<?php
		return false;
	}
	
	if( empty($_POST['port']) ) {
		?>
		<script language="javascript">
			alert("Please, enter port number.");
		</script>
		<?php
		return false;
	}



	return true;
}

function checkFileName()
{
	if( empty($_POST['filename']) ) {
		?>
		<script language="javascript">
			alert("Please, fill 'FileName' field.");
		</script>
		<?php
		return false;
	}
	
	return true;	
}

if( !empty($_POST['filename']) && $_POST['updconfig'] == "boot" ) {

	if(checkFileName() && checkConnectFields()) {
		
		$net->UpdateConfig($_POST['filename']);
	}
}

?>

</body>
</html>