Yes, lets go..
Edit Pass script:
Getting these errors
Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6
Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6
Warning: main(functions.php): failed to open stream: No such file or directory in /home/speedan/public_html/sc/admin/editpass.php on line 6
Warning: main(): Failed opening 'functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/speedan/public_html/sc/admin/editpass.php on line 6
Fatal error: Cannot instantiate non-existent class: checklogin in /home/speedan/public_html/sc/admin/editpass.php on line 7
code:
This one aswell.PHP Code:<?php
if(isset($_SESSION["EON_CNTPNL_USERNAME"]))
{ $check->login(); }
else{
session_start();
include("inc/config.php");
$check = new checklogin;
$check->login(); }
echo("
<b>Edit your password!</b><br/>
<br/>");
if($_GET["act"] == "update")
{
$password = clean($_POST["password"]);
$password2 = md5($password);
$password2 = sha1($password2);
mysql_query("UPDATE `users` SET `password` = '$password2' WHERE `username` = '{$_SESSION["panel_username"]}'");
echo("Password Updated");
exit;
}
else
{
$rand = generateRandStr(13);
echo("Please set a new password:<br/><form action=\"?page=editpass&act=update\" method=\"POST\"><input type=\"text\" name=\"password\" value=\"$rand\" class=\"formbox\"> <b><-- Suggested</b><br/><br/><input type=\"submit\" name=\"submit\" value=\"Change Password\"><br/><br/>
The suggested password was $rand<br/>(So you can copy and paste)</form>");
}
?>
Help, thanksPHP Code:<?
include('../inc/dotconnect.php');
$id = $_POST['id'];
$name = $_POST['name'];
$owner = $_POST['owner'];
$port = $_POST['port'];
$listeners = $_POST['listeners'];
$result = mysql_query("SELECT * FROM servers WHERE port='$port'")
or die(mysql_error());
$row = mysql_fetch_array( $result );
$id = $row['id'];
$num=mysql_num_rows($result);
if($num < 1){ } ELSE { echo 'Server with the chosen port already exists, Please cose this windows and try again'; die();}
mysql_query("INSERT INTO servers (id, nick, owner, port, listeners) VALUES('$id', '$name', '$owner', '$port', '$listeners' ) ")
or die(mysql_error());
?>
<p><font face="Verdana" size="4">Your information has been updated, You may now
close this window</font></p>
<table border="1" width="51%" id="table1">
<tr>
<td width="135">Server Name</td>
<td><? echo $name ?></td>
</tr>
<tr>
<td width="135">owner</td>
<td><? echo $owner ?></td>
</tr>
<tr>
<td width="135">Port</td>
<td><? echo $port ?></td>
</tr>
<tr>
<td width="135">Listeners</td>
<td><? echo $listeners ?></td>
</tr>
</table>





Reply With Quote







