示例#1
0
文件: exec.php 项目: nubix/cms
function clear()
{
    global $user, $mysql, $log, $msg;
    if (!isset($_POST['confirm_pass'])) {
        $data = '<p>Bitte geben Sie zur Bestätigung ihr Passwort ein:</p>
			<form action=' . $_SERVER['REQUEST_URI'] . ' method=post>
			<input type=password name=confirm_pass />
			<input type=submit value=Löschen />
			</form>';
    } else {
        if (!($user->password == sha1($_POST['confirm_pass']))) {
            $msg->error("Ihr Passwort ist Falsch");
            //Confirmpass unset damit formular angezeigt wird.
            unset($_POST['confirm_pass']);
            $data = clear();
        } else {
            $mysql->query("DELETE FROM " . _PREFIX_ . "log");
            $log->add("Aktionschronik vollständig gelöscht");
            $msg->success("Aktionschronik vollständig gelöscht.");
            $data = showlog();
        }
    }
    return $data;
}
示例#2
0
        if (mysql_num_rows($data) == 0) {
            showlog("User doesnot exist");
        } else {
            $info = mysql_fetch_array($data);
            if ($info['password'] != $pw) {
                showlog("Password incorrect");
            } else {
                if ($info['status'] == 'inactive') {
                    showlog("Sorry, you are not an active user.");
                } else {
                    $_SESSION['user'] = $name;
                    echo "<h3>Welcome back " . $_SESSION['user'] . "</h3>";
                }
            }
        }
    } else {
        showlog("Please login or register");
    }
} else {
    echo "You already logged in ," . $_SESSION['user'];
}
function showlog($message)
{
    include 'login.php';
    echo "<h3>" . $message . "</h3>";
}
?>
		</div>
	</body>
</html>
示例#3
0
function convertCal()
{
    if (ModuleUtil::getIsEnabled('calendar')) {
        global $ibos2Config, $editPre;
        $sql = "REPLACE INTO \r\n{$ibos2Config['dbPre']}calendars(\r\n`calendarid`,\r\n`subject`,\r\n`location`,\r\n`mastertime`,\r\n`masterid`,\r\n`description`,\r\n`calendartype`,\r\n`starttime`,\r\n`endtime`,\r\n`isalldayevent`,\r\n`hasattachment`,\r\n`category`,\r\n`instancetype`,\r\n`recurringtype`,\r\n`recurringtime`,\r\n`status`,\r\n`recurringbegin`,\r\n`recurringend`,\r\n`attendees`,\r\n`attendeenames`,\r\n`otherattendee`,\r\n`upuid`,\r\n`upname`,\r\n`uptime`,\r\n`recurringrule`,\r\n`uid`\r\n) SELECT \r\n`Id`,\r\n`Subject`,\r\n`Location`,\r\n`MasterTime`,\r\n`MasterId`,\r\n`Description`,\r\n`CalendarType`,\r\n`StartTime`,\r\n`EndTime`,\r\n`IsAllDayEvent`,\r\n`HasAttachment`,\r\n`Category`,\r\n`InstanceType`,\r\n`RecurringType`,\r\n`RecurringTime`,\r\n`Status`,\r\n`RecurringBegin`,\r\n`RecurringEnd`,\r\n`Attendees`,\r\n`AttendeeNames`,\r\n`OtherAttendee`,\r\n`UPAccount`,\r\n`UPName`,\r\n`UPTime`,\r\n`RecurringRule`,\r\n`uid`\r\nFROM {$editPre}calendars";
        $do = mysql_query($sql);
        showlog("日程表转换完成");
    }
}
示例#4
0
	<body>
		<h1>Hello, Lost your password?</h1>
		<?php 
if (!isset($_POST['Enter'])) {
    include 'pwform.php';
    echo "<h3>Fill your information. </h3>";
} else {
    $name = $_POST['a'];
    $em = $_POST['b'];
    $data = mysql_query("SELECT * FROM member WHERE uid = '{$name}' ") or die(mysql_error());
    if (mysql_num_rows($data) == 0) {
        showlog("User doesnot exist");
    } else {
        $info = mysql_fetch_array($data);
        if ($info['email'] != $em) {
            showlog("Email incorrect");
        } else {
            $_SESSION['reset'] = $name;
            ?>
								<div>
									<form action="reset.php" method="post">
									<div>
										<span>New password : </span><br>
										<input type="text" name="c" class="username" required/>
									</div>
										<input type="submit" name="reset" value="Enter" />
									</form> 
									<h3>Enter your new password</h3>
								</div>
								<?php 
        }