示例#1
0
文件: admin.php 项目: KinG-InFeT/DxBB
<?php

include_once "include/template.class.php";
include_once "include/admin.class.php";
$template = new DxTemplate();
$section = new Admin();
@($action = intval($_GET['action']));
print $template->Head("Administration Page");
print $template->includeCSS("template/Default/style.tmp");
print $template->includeJS("include/menu.js");
print $template->openBody(0);
print '<center>';
print $template->openDiv("header");
print $template->closeDiv();
print $template->setMenu(explode('/', $_SERVER['PHP_SELF']), 4);
print $template->openDiv("body");
print $section->setMenu();
print '<h2 align="center">Administration Pannel Control</h2>';
if ($section->is_admin()) {
    if ($action == 1) {
        print '<form method="POST" action="?action=1">
			<table width="100%" valign="top">
				<tr>
					<td> Name: </td>
					<td> <input type="text" name="name" /> </td>
				</tr>
				<tr>
					<td>Description: </td>
					<td><input type="text" name="description" /> </td>
				</tr>
				<tr /> 
示例#2
0
    if (@$_POST['new'] == 'new_topic') {
        if (isset($_POST['name']) && isset($_POST['text'])) {
            if ($newTopic->is_user()) {
                $newTopic->newTopic($_POST['name'], $_POST['text'], $_POST['id']);
                print "<script> window.location='viewSection.php?id=" . $_POST['id'] . "' </script>";
            } else {
                print "<script> window.location='index.php' </script>";
            }
        } else {
            echo "<script>alert(\"Errore! Inserire Nome e Testo.\"); windows.location=\"viewSection.php\";</script>";
        }
    }
} else {
    include "include/security.php";
    $template = new DxTemplate();
    print $template->Head("viewSection");
    print $template->includeCSS("template/Default/style.tmp");
    print $template->includeJS("include/menu.js");
    print $template->openBody(0);
    print '<center>';
    print $template->openDiv("header");
    print $template->closeDiv();
    print $template->openDiv("body");
    print $template->setMenu(explode('/', $_SERVER['PHP_SELF']), 5);
    $id = protectVar($_GET['id']);
    if (empty($id)) {
        die("<p align='center'>ID non specificato!</p>");
    }
    $template->printTopics($id);
    print $template->closeDiv();
    //		print $template->openDiv ("body-left");
示例#3
0
文件: index.php 项目: KinG-InFeT/DxBB
<?php

include_once "include/template.class.php";
$template = new DxTemplate();
print $template->Head("Home");
print $template->includeCSS("template/Default/style.tmp");
print $template->includeJS("include/menu.js");
print $template->openBody(0);
print '<center>';
print $template->openDiv("header");
print $template->closeDiv();
print $template->openDiv("body");
print $template->setMenu(explode('/', $_SERVER['PHP_SELF']), 4);
$template->printForum();
print $template->closeDiv();
print $template->closeDiv();
print '</center>';
print $template->closeBody();
示例#4
0
    if (@$_POST['new'] == 'new_post') {
        if (!empty($_POST['text'])) {
            if ($newPost->is_user()) {
                $newPost->newPost($_POST['text'], $_GET['id']);
                print "<script> window.location='viewTopic.php?id=" . (int) $_GET['id'] . "' </script>";
            } else {
                print "<script> window.location='index.php' </script>";
            }
        } else {
            echo "<script>alert(\"Errore! Inserire Testo.\"); windows.location=\"viewTopic.php\";</script>";
        }
    }
} else {
    include "include/security.php";
    $id = protectVar($_GET['id']);
    if (empty($id)) {
        die("<p align='center'>ID non specificato!");
    }
    $template = new DxTemplate();
    print $template->Head("viewTopic");
    print $template->includeCSS("template/Default/viewTopic/style.tmp");
    print $template->includeJS("include/menu.js");
    print $template->openBody(0);
    print "<center>";
    print $template->openDiv("header");
    print $template->closeDiv();
    print $template->setMenu(explode('/', $_SERVER['PHP_SELF']), 5);
    $template->printTopicAndPost($id);
    print "\n</center>";
}
print $template->closeBody();
示例#5
0
<?php

include "include/template.class.php";
include "include/user.class.php";
include_once "include/mysql.class.php";
$template = new DxTemplate();
$register = new User();
print $template->Head("Register");
print $template->includeCSS("template/Default/style.tmp");
print $template->includeJS("include/menu.js");
print $template->openBody(1);
print '<center>';
print $template->openDiv("header");
print $template->closeDiv();
print $template->openDiv("body");
print $template->setMenu(explode('/', $_SERVER['PHP_SELF']), 4);
if ($register->is_user()) {
    die("Ma Sei cretino? sei loggato e vuoi registrarti? LOL");
}
print '<form method="POST">
			<table width="100%" valign="top">
				<tr>
					<td> Nickname: </td>
					<td> <input type="text" name="username" /> </td>
				</tr>
				<tr>
					<td>Password: </td>
					<td><input type="password" name="password" /> </td>
				</tr>
				<tr /> 
				<tr>
示例#6
0
文件: login.php 项目: KinG-InFeT/DxBB
<?php

include_once "include/template.class.php";
include_once "include/user.class.php";
if (isset($_POST['username']) && isset($_POST['password'])) {
    $login = new User();
    if ($login->login($_POST['username'], $_POST['password'])) {
        echo '<script> window.location="index.php"; </script>';
    }
}
$template = new DxTemplate();
print $template->Head("Login");
print $template->includeCSS("template/Default/style.tmp");
print $template->includeJS("include/menu.js");
print $template->openBody(1);
print '<center>';
print $template->openDiv("header");
print $template->closeDiv();
print $template->openDiv("body");
print $template->setMenu(explode('/', $_SERVER['PHP_SELF']), 4);
print '<form action="login.php" method="POST">
			<table width="100%" valign="top">
				<tr>
					<td> Nickname: </td>
					<td> <input type="text" name="username" /> </td>
				</tr>
				<tr>
					<td> Password: </td>
					<td> <input type="password" name="password" /> </td>
				</tr>
				<tr /> <tr />