Example #1
0
                                     $apps_n .= "</table>\n";
                                     $apps_d .= "</table>\n";
                                     $apps_a .= "</table>\n";
                                     echo "<B>New Applications</B><BR>\n";
                                     echo ($rn > 0 ? $apps_n : "There are no new applications") . "<BR><BR><BR><BR>\n";
                                     echo "<B style='font-size: 12pt; text-decoration: underline;'>Log</B><BR><BR>";
                                     echo "<B>Accepted Applications</B><BR>\n";
                                     echo ($ra > 0 ? $apps_a : "You haven't accepted any applications yet.") . "<BR><BR>\n";
                                     echo "<B>Declined Applications</B><BR>\n";
                                     echo ($rd > 0 ? $apps_d : "You haven't declined any applications yet.") . "<BR><BR>\n";
                                 }
                             } else {
                                 if ($adminaction == "chpass") {
                                     if (($oldpass == $password || md5($oldpass) == $password || $oldpass == md5($password)) && $newpass && $repeatpass) {
                                         if ($newpass == $repeatpass) {
                                             ChangePass($login, $newpass, $chatpath);
                                             echo "<p>Password for {$login} was changed.<p>";
                                             $password = $newpass;
                                         }
                                     } else {
                                         echo "<p>Fill out the form.<p>\n\t\t\t\t\t<input type=hidden name=adminaction value={$adminaction}>\n\t\t\t\t\t<table BORDER=0 CELLSPACING=3 CELLPADDING=3>\n\t\t\t\t\t<tr><td>\n\t\t\t\t\tCurrent password:\n\t\t\t\t\t</td><td>\n\t\t\t\t\t<input type=password name=oldpass size=15 max=25>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t<tr><td>\n\t\t\t\t\tNew password:\n\t\t\t\t\t</td><td>\n\t\t\t\t\t<input type=password name=newpass size=15 max=25>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t<tr><td>\n\t\t\t\t\tRepeat new:\n\t\t\t\t\t</td><td>\n\t\t\t\t\t<input type=password name=repeatpass size=15 max=25>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table>";
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Example #2
0
        EditWord($_GET['id'] + 0);
    } elseif ($_GET['action'] == 'delete') {
        DeleteWord($_GET['id'] + 0);
    } elseif ($_GET['action'] == 'logout') {
        Logout();
    } elseif ($_GET['action'] == 'rewrite') {
        ModRewrite();
    } elseif ($_GET['action'] == 'change') {
        if ($_POST['submit'] == 2) {
            if (ModPass()) {
                Redirect('admin.php');
            } else {
                ChangePass();
            }
        } else {
            ChangePass();
        }
    }
}
include '_header.php';
echo $GLOBALS['adminContent'];
include '_footer.php';
mysql_close();
function ModRewrite()
{
    global $turn;
    $handle = fopen(".htaccess", "r+");
    $contents = fread($handle, filesize(".htaccess"));
    fclose($handle);
    $chandle = fopen("config.php", "r+");
    $cc = fread($chandle, filesize("config.php"));