Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
RadiPanel Issue
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="DoctorCooper" data-source="post: 458689" data-attributes="member: 14371"><p>Error Received</p><p>[ATTACH=full]10423[/ATTACH]</p><p></p><p>Code</p><p></p><p></p><p>[CODE=php]<?php</p><p> require_once( "../_inc/core.inc.php" );</p><p>?></p><p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"</p><p> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p><p><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"></p><p></p><p> <head></p><p></p><p> <title>radiPanel Installer</title></p><p></p><p> <script type="text/javascript" src="../_js/prototype.js"></script></p><p> <script type="text/javascript" src="../_js/scriptaculous.js"></script></p><p> <script type="text/javascript" src="../_js/validation.js"></script></p><p> <script type="text/javascript" src="../_js/radi.js"></script></p><p></p><p> <style type="text/css" media="screen">@import url('../_img/style.css');</style> </p><p> <style type="text/css" media="screen"></p><p> </p><p> #wrap {</p><p> </p><p> width: 600px;</p><p> margin: auto;</p><p> </p><p> }</p><p> </p><p> </style></p><p></p><p> </head></p><p></p><p> <body></p><p> </p><p> <div id="wrap"></p><p></p><p> <form action="" method="post" id="installer"></p><p></p><p> <big>radiPanel Installer</big></p><p></p><p> <?php</p><p> </p><p> if( $_POST['submit'] ) {</p><p> </p><p> try {</p><p> </p><p> $sql_hostname = $core->clean( $_POST['sql_hostname'] );</p><p> $sql_username = $core->clean( $_POST['sql_username'] );</p><p> $sql_password = $core->clean( $_POST['sql_password'] );</p><p> $sql_database = $core->clean( $_POST['sql_database'] );</p><p> </p><p> $radio_ip = $core->clean( $_POST['radio_ip'] );</p><p> $radio_port = $core->clean( $_POST['radio_port'] );</p><p> $radio_password = $core->clean( $_POST['radio_password'] );</p><p> </p><p> $user_username = $core->clean( $_POST['user_username'] );</p><p> $user_password = $core->clean( $_POST['user_password'] );</p><p> </p><p> $misc_timeout = $core->clean( $_POST['misc_timeout'] );</p><p> </p><p> $salt1 = md5( mt_rand() );</p><p> $salt1 = str_split( $salt1, 10 );</p><p> $salt1 = $salt1[0];</p><p> </p><p> $salt2 = md5( mt_rand() );</p><p> $salt2 = str_split( $salt2, 10 );</p><p> $salt2 = $salt2[0];</p><p> </p><p> if( !$sql_hostname or !$sql_username or !$sql_database</p><p> or !$radio_ip or !$radio_port or !$radio_password</p><p> or !$user_username or !$user_password</p><p> or !$misc_timeout ) {</p><p> </p><p> throw new Exception( "All fields are required!" );</p><p> </p><p> }</p><p> elseif( !$conn = @mysql_connect( $sql_hostname, $sql_username, $sql_password ) ) {</p><p> </p><p> throw new Exception( "Your MySQL server information seems to be invalid." );</p><p> </p><p> }</p><p> elseif( !@mysql_select_db( $sql_database, $conn ) ) {</p><p> </p><p> throw new Exception( "Your MySQL database doesn't exist." );</p><p> </p><p> }</p><p> else {</p><p> </p><p> $config = file_get_contents( "glob.php" );</p><p> </p><p> $config = str_replace( "conf_hostname", $sql_hostname, $config );</p><p> $config = str_replace( "conf_username", $sql_username, $config );</p><p> $config = str_replace( "conf_password", $sql_password, $config );</p><p> $config = str_replace( "conf_database", $sql_database, $config );</p><p> </p><p> $config = str_replace( "conf_salt1", $salt1, $config );</p><p> $config = str_replace( "conf_salt2", $salt2, $config );</p><p> </p><p> $config = str_replace( "conf_timeout", $misc_timeout, $config );</p><p> </p><p> file_put_contents( "../_inc/glob.php", $config );</p><p> </p><p> $sql = file( "_inst.sql" );</p><p> </p><p> foreach( $sql as $sql_line ) {</p><p> </p><p> if( trim($sql_line ) != "" and strpos( $sql_line, "--" ) === false ) {</p><p> </p><p> //echo $sql_line . "<br />";</p><p> mysql_query( $sql_line );</p><p> </p><p> }</p><p> </p><p> }</p><p> </p><p> $user_password = $core->encrypt( $user_password );</p><p> </p><p> mysql_query( "INSERT INTO users VALUES (NULL, '{$user_username}', '{$user_password}', '', '', '5', '1,2,3,4,5');" );</p><p> mysql_query( "INSERT INTO connection_info VALUES (NULL, '{$radio_ip}', '{$radio_port}', '{$radio_password}', '1', '{$_SERVER['REMOTE_ADDR']}');" );</p><p></p><p> echo "<div class=\"box\">";</p><p> echo "<div class=\"square good\" style=\"margin-bottom: 0px;\">";</p><p> echo "<strong>Success</strong>";</p><p> echo "<br />";</p><p> echo "radiPanel has been successfully installed! Please delete the /_installer directory before using your panel.";</p><p> echo "</div>";</p><p> echo "</div>";</p><p> </p><p> }</p><p> </p><p> }</p><p> catch( Exception $e ) {</p><p> </p><p> echo "<div class=\"box\">";</p><p> echo "<div class=\"square bad\" style=\"margin-bottom: 0px;\">";</p><p> echo "<strong>Error</strong>";</p><p> echo "<br />";</p><p> echo $e->getMessage();</p><p> echo "</div>";</p><p> echo "</div>";</p><p> </p><p> }</p><p> </p><p> }</p><p> ?></p><p> </p><p> <div class="box"></p><p> </p><p> <div class="square title"></p><p> </p><p> <strong>MySQL Configuration</strong></p><p> </p><p> </div></p><p> </p><p> </p><p> <div class="content"></p><p> </p><p> <table width="100%" cellpadding="3" cellspacing="0"></p><p> </p><p> <?php</p><p> </p><p> echo $core->buildField( "text",</p><p> "required",</p><p> "sql_hostname",</p><p> "MySQL Hostname",</p><p> "Your hostname (probably localhost).",</p><p> "localhost" );</p><p></p><p> echo $core->buildField( "text",</p><p> "required",</p><p> "sql_username",</p><p> "MySQL Username",</p><p> "Your MySQL username." );</p><p></p><p> echo $core->buildField( "text",</p><p> "notrequired",</p><p> "sql_password",</p><p> "MySQL Password",</p><p> "Your MySQL password." );</p><p></p><p> echo $core->buildField( "text",</p><p> "required",</p><p> "sql_database",</p><p> "MySQL Database",</p><p> "Your MySQL database's name." );</p><p></p><p> ?></p><p> </p><p> </table></p><p> </p><p> </div></p><p> </p><p> </div></p><p></p><p> <div class="box"></p><p></p><p> <div class="square title"></p><p></p><p> <strong>Radio Configuration</strong></p><p></p><p> </div></p><p></p><p></p><p> <div class="content"></p><p></p><p> <table width="100%" cellpadding="3" cellspacing="0"></p><p></p><p> <?php</p><p></p><p> echo $core->buildField( "text",</p><p> "required",</p><p> "radio_ip",</p><p> "Radio IP",</p><p> "Your radio server's IP or hostname." );</p><p></p><p> echo $core->buildField( "text",</p><p> "required",</p><p> "radio_port",</p><p> "Radio Port",</p><p> "Your radio server's port." );</p><p></p><p> echo $core->buildField( "text",</p><p> "required",</p><p> "radio_password",</p><p> "Radio Password",</p><p> "Your radio server's password." );</p><p></p><p> ?></p><p></p><p> </table></p><p></p><p> </div></p><p></p><p> </div></p><p></p><p> <div class="box"></p><p></p><p> <div class="square title"></p><p></p><p> <strong>User Configuration</strong></p><p></p><p> </div></p><p></p><p></p><p> <div class="content"></p><p></p><p> <table width="100%" cellpadding="3" cellspacing="0"></p><p></p><p> <?php</p><p></p><p> echo $core->buildField( "text",</p><p> "required",</p><p> "user_username",</p><p> "Username",</p><p> "Your first user's username." );</p><p></p><p> echo $core->buildField( "password",</p><p> "required",</p><p> "user_password",</p><p> "Password",</p><p> "Your first user's password." );</p><p></p><p> ?></p><p></p><p> </table></p><p></p><p> </div></p><p></p><p> </div></p><p></p><p> <div class="box"></p><p></p><p> <div class="square title"></p><p></p><p> <strong>Miscellaneous Configuration</strong></p><p></p><p> </div></p><p></p><p></p><p> <div class="content"></p><p></p><p> <table width="100%" cellpadding="3" cellspacing="0"></p><p></p><p> <?php</p><p></p><p> $times = array( "10 minutes" => "10 minutes",</p><p> "15 minutes" => "15 minutes",</p><p> "20 minutes" => "20 minutes",</p><p> "30 minutes" => "30 minutes",</p><p> "45 minutes" => "45 minutes",</p><p> "60 minutes" => "60 minutes" );</p><p></p><p> echo $core->buildField( "select",</p><p> "required",</p><p> "misc_timeout",</p><p> "Login Timeout",</p><p> "Your panel's login timeout.",</p><p> $times );</p><p></p><p> ?></p><p></p><p> </table></p><p></p><p> </div></p><p></p><p> </div></p><p></p><p> <div class="box" align="right"></p><p> </p><p> <input class="button" type="submit" name="submit" value="Submit" /></p><p> </p><p> </div></p><p></p><p> </form></p><p></p><p> <?php</p><p> </p><p> echo $core->buildFormJS( "installer" );</p><p> </p><p> ?></p><p></p><p> </div></p><p></p><p> </body></p><p></p><p></html>[/CODE]</p><p></p><p>Any ideas ?</p></blockquote><p></p>
[QUOTE="DoctorCooper, post: 458689, member: 14371"] Error Received [ATTACH=full]10423[/ATTACH] Code [CODE=php]<?php require_once( "../_inc/core.inc.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" xml:lang="en"> <head> <title>radiPanel Installer</title> <script type="text/javascript" src="../_js/prototype.js"></script> <script type="text/javascript" src="../_js/scriptaculous.js"></script> <script type="text/javascript" src="../_js/validation.js"></script> <script type="text/javascript" src="../_js/radi.js"></script> <style type="text/css" media="screen">@import url('../_img/style.css');</style> <style type="text/css" media="screen"> #wrap { width: 600px; margin: auto; } </style> </head> <body> <div id="wrap"> <form action="" method="post" id="installer"> <big>radiPanel Installer</big> <?php if( $_POST['submit'] ) { try { $sql_hostname = $core->clean( $_POST['sql_hostname'] ); $sql_username = $core->clean( $_POST['sql_username'] ); $sql_password = $core->clean( $_POST['sql_password'] ); $sql_database = $core->clean( $_POST['sql_database'] ); $radio_ip = $core->clean( $_POST['radio_ip'] ); $radio_port = $core->clean( $_POST['radio_port'] ); $radio_password = $core->clean( $_POST['radio_password'] ); $user_username = $core->clean( $_POST['user_username'] ); $user_password = $core->clean( $_POST['user_password'] ); $misc_timeout = $core->clean( $_POST['misc_timeout'] ); $salt1 = md5( mt_rand() ); $salt1 = str_split( $salt1, 10 ); $salt1 = $salt1[0]; $salt2 = md5( mt_rand() ); $salt2 = str_split( $salt2, 10 ); $salt2 = $salt2[0]; if( !$sql_hostname or !$sql_username or !$sql_database or !$radio_ip or !$radio_port or !$radio_password or !$user_username or !$user_password or !$misc_timeout ) { throw new Exception( "All fields are required!" ); } elseif( !$conn = @mysql_connect( $sql_hostname, $sql_username, $sql_password ) ) { throw new Exception( "Your MySQL server information seems to be invalid." ); } elseif( !@mysql_select_db( $sql_database, $conn ) ) { throw new Exception( "Your MySQL database doesn't exist." ); } else { $config = file_get_contents( "glob.php" ); $config = str_replace( "conf_hostname", $sql_hostname, $config ); $config = str_replace( "conf_username", $sql_username, $config ); $config = str_replace( "conf_password", $sql_password, $config ); $config = str_replace( "conf_database", $sql_database, $config ); $config = str_replace( "conf_salt1", $salt1, $config ); $config = str_replace( "conf_salt2", $salt2, $config ); $config = str_replace( "conf_timeout", $misc_timeout, $config ); file_put_contents( "../_inc/glob.php", $config ); $sql = file( "_inst.sql" ); foreach( $sql as $sql_line ) { if( trim($sql_line ) != "" and strpos( $sql_line, "--" ) === false ) { //echo $sql_line . "<br />"; mysql_query( $sql_line ); } } $user_password = $core->encrypt( $user_password ); mysql_query( "INSERT INTO users VALUES (NULL, '{$user_username}', '{$user_password}', '', '', '5', '1,2,3,4,5');" ); mysql_query( "INSERT INTO connection_info VALUES (NULL, '{$radio_ip}', '{$radio_port}', '{$radio_password}', '1', '{$_SERVER['REMOTE_ADDR']}');" ); echo "<div class=\"box\">"; echo "<div class=\"square good\" style=\"margin-bottom: 0px;\">"; echo "<strong>Success</strong>"; echo "<br />"; echo "radiPanel has been successfully installed! Please delete the /_installer directory before using your panel."; echo "</div>"; echo "</div>"; } } catch( Exception $e ) { echo "<div class=\"box\">"; echo "<div class=\"square bad\" style=\"margin-bottom: 0px;\">"; echo "<strong>Error</strong>"; echo "<br />"; echo $e->getMessage(); echo "</div>"; echo "</div>"; } } ?> <div class="box"> <div class="square title"> <strong>MySQL Configuration</strong> </div> <div class="content"> <table width="100%" cellpadding="3" cellspacing="0"> <?php echo $core->buildField( "text", "required", "sql_hostname", "MySQL Hostname", "Your hostname (probably localhost).", "localhost" ); echo $core->buildField( "text", "required", "sql_username", "MySQL Username", "Your MySQL username." ); echo $core->buildField( "text", "notrequired", "sql_password", "MySQL Password", "Your MySQL password." ); echo $core->buildField( "text", "required", "sql_database", "MySQL Database", "Your MySQL database's name." ); ?> </table> </div> </div> <div class="box"> <div class="square title"> <strong>Radio Configuration</strong> </div> <div class="content"> <table width="100%" cellpadding="3" cellspacing="0"> <?php echo $core->buildField( "text", "required", "radio_ip", "Radio IP", "Your radio server's IP or hostname." ); echo $core->buildField( "text", "required", "radio_port", "Radio Port", "Your radio server's port." ); echo $core->buildField( "text", "required", "radio_password", "Radio Password", "Your radio server's password." ); ?> </table> </div> </div> <div class="box"> <div class="square title"> <strong>User Configuration</strong> </div> <div class="content"> <table width="100%" cellpadding="3" cellspacing="0"> <?php echo $core->buildField( "text", "required", "user_username", "Username", "Your first user's username." ); echo $core->buildField( "password", "required", "user_password", "Password", "Your first user's password." ); ?> </table> </div> </div> <div class="box"> <div class="square title"> <strong>Miscellaneous Configuration</strong> </div> <div class="content"> <table width="100%" cellpadding="3" cellspacing="0"> <?php $times = array( "10 minutes" => "10 minutes", "15 minutes" => "15 minutes", "20 minutes" => "20 minutes", "30 minutes" => "30 minutes", "45 minutes" => "45 minutes", "60 minutes" => "60 minutes" ); echo $core->buildField( "select", "required", "misc_timeout", "Login Timeout", "Your panel's login timeout.", $times ); ?> </table> </div> </div> <div class="box" align="right"> <input class="button" type="submit" name="submit" value="Submit" /> </div> </form> <?php echo $core->buildFormJS( "installer" ); ?> </div> </body> </html>[/CODE] Any ideas ? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
RadiPanel Issue
Top