Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start( );
- define( "CLIENTAREA", true );
- require( "dbconnect.php" );
- require( "includes/functions.php" );
- require( "includes/clientareafunctions.php" );
- require( "modules/addons/proxmox/functions.php");
- $pagetitle = "Serial Console";
- initialiseClientArea( $pagetitle, "", "" );
- $smartyvalues['variablename'] = $value;
- $servid = $_GET['id'];
- if (!CheckLicense_Proxmox_ClientArea()) {
- echo "<div style=\"background-color:#FFBFBF;padding:10px;margin:0 0 10px;text-align:center;color:#7F0000;\">Service unavailable</div>";
- return;
- }
- if ( $servid != "" )
- {
- if ( $_SESSION['uid'] || $_SESSION['adminid'] )
- {
- if ($_SESSION['adminid']){
- $uid = $_SESSION['uid'];
- $q1 = mysql_query( "SELECT * FROM tblhosting WHERE id ='{$servid}'" );
- $isowner = mysql_num_rows( $q1 );
- }else{
- $uid = $_SESSION['uid'];
- $q1 = mysql_query( "SELECT * FROM tblhosting WHERE id ='{$servid}' AND userid='{$uid}'" );
- $isowner = mysql_num_rows( $q1 );
- }
- if ( $isowner == "1" )
- {
- $r1 = mysql_fetch_array( $q1 );
- $q2 = mysql_query( "SELECT * FROM tblcustomfields WHERE relid ='{$r1['packageid']}' AND fieldname='vserverid'" );
- $isvserverid = mysql_num_rows( $q2 );
- if ( $isvserverid == "1" )
- {
- $r2 = mysql_fetch_array( $q2 );
- $q3 = mysql_query( "SELECT * FROM tblcustomfieldsvalues WHERE fieldid ='{$r2['id']}' AND relid='{$r1['id']}'" );
- $isvserveridset = mysql_num_rows( $q3 );
- if ( $isvserveridset )
- {
- $r3 = mysql_fetch_array( $q3 );
- if ( is_numeric( $r3[value] ) )
- {
- $q4 = mysql_query( "SELECT * FROM tblproducts WHERE id ='{$r1['packageid']}'" );
- $r4 = mysql_fetch_array( $q4 );
- if ( $r1['server'] == "0" || $r1['server'] == "" )
- {
- $ServerId = explode( "-", $r4['configoption1'] );
- $ServerId = $ServerId[0];
- }
- else
- {
- $ServerId = $r1['server'];
- }
- $q5 = mysql_query( "SELECT * FROM tblservers WHERE id ='{$ServerId}'" );
- $r5 = mysql_fetch_array( $q5 );
- $ipaddress = $r5['ipaddress'];
- $ServerUrl = 'https://'.$r5['ipaddress'].':8006';
- $ServerUsername = $r5['username'];
- $ServerPassword = decrypt($r5['password']);
- $vserverid = $r3[value];
- ..................................................................
- ....................................
- .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement