Its in cpconf.php

<?
$l33t = "C:/miniserve/Apache/conf/l33t.conf";
$syspath = "C:";
$install = "0";
$siteex = "MySite.Org";
$admin = "mini";
$adpw = "serve";

?>



"Shena Delian O'Brien" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Where are you passing the variable "install"? I can't see it in your
> form. Perhaps look for $check instead of $install?
>
> Mark Clarkstone wrote:
> > now the script works but won't write to the file just returns to the
form.
> >
> > <title> Control Panel</title>
> > <font face=\"Tahoma\" size=\"2\">
> > <?
> > require("cpconf.php");
> >
> > if ($install=="0") {
> >
> > print "<p><font size=\"2\" face=\"Tahoma\"><b>Welcome to The Control
Panel
> > Installer<br>
> > <br>
> > </b>This will install the control Panel</font></p>
> > <form method=\"POST\" action=\"?action=check\">
> >   <font face=\"Tahoma\" size=\"2\">Please enter your site domain e.g.
> >   freesite.cjb.com (without a www or a dot please) leave as localhost if
you
> > are
> >   using it as a local testing server.</font><br>
> >   <input type=\"text\" name=\"csiteex\" size=\"20\"
value=\"localhost\"><br>
> >   <br>
> >   <font size=\"2\" face=\"Tahoma\">Please enter a Username &amp;
password to
> > access the
> >   area<br>
> >   Username<br>
> >   <input type=\"text\" name=\"user\" size=\"20\"><br>
> >   Password<br>
> >   <input type=\"text\" name=\"pass\" size=\"20\"></font><br>
> >   <input type=\"submit\" value=\"Submit\" name=\"B1\"></p>
> > </form>";
> > }
> > else if ($action=="check") {
> >
> > if (!$csiteex) {
> > echo "Please enter your domain";
> > }
> > else if (!$user) {
> > echo "Please enter a username";
> > }
> > else if (!$pass) {
> > echo "Please enter a password";
> > }
> > else {
> > $data = "<?
> > \$l33t = \"C:/miniserve/Apache/conf/l33t.conf\";
> > \$syspath = \"C:\";
> > \$install = \"1\";
> > \$siteex = \"$csiteex\";
> > \$admin = \"$user\";
> > \$adpw = \"$pass\";
> >
> > ?>";
> > $fp = fopen("cpconf.php",'w');
> > $fw = fwrite($fp,$data);
> > fclose($fp);
> > echo "Done!";
> > }
> > }
> > else if ($install =="1") {
> > echo "<p><font size=\"2\" face=\"Tahoma\"><b>Welcome to The Control
> > Panel</b></font></p>
> > <form method=\"POST\" action=\"?login=check\">
> >   <font size=\"2\" face=\"Tahoma\">Please enter a Username &amp;
password to
> > access the
> >   area<br>
> >   Username<br>
> >   <input type=\"text\" name=\"userlogin\" size=\"20\"><br>
> >   Password<br>
> >   <input type=\"text\" name=\"passlogin\" size=\"20\"></font><br>
> >   <input type=\"submit\" value=\"Submit\" name=\"B1\"></p>
> > </form>";
> > }
> > else if ($login=="check") {
> >
> > if (!$userlogin && !$passlogin) {
> > echo "Sorry but No Username or password was found";
> > }
> > else if ($userlogin && $userpass == $admin && $adpw) {
> > include("admin.php");
> > }
> > }
> > ?>
> >
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to