Example #1
0
<?php

//entry.php
$page_name = "entry.php";
include 'core.php';
$ids = @$_GET['ref'];
$ids = htmlentities($ids);
include 'dbms/dbms_imp.php';
$ids = netutralize($ids, $connection);
mysqli_close($connection);
$notice = new notice($ids);
$current_user = new user();
$current_user->get_user($userid);
$title = $notice->title;
$keywords = $notice->tags;
$description = $notice->bref;
?>

<!doctype html>

<html lang="en">
<?php 
//includind the head tag
require 'head.php';
?>

<body>

<?php 
// including the header of the document
require 'header.php';
Example #2
0
function login($message = '')
{
    ?>
          <div class="mdl-card mdl-shadow--4dp mdl-cell mdl-cell--12-col">
            <style>
              .demo-blog--blogpost .demo-blog__posts > .mdl-card .mdl-card__media 
              {
                background-image: url('images/login.jpg');
                height: 200px;
              }
            </style>
            <div class="mdl-card__media mdl-color-text--grey-50">
              <h3></h3>
            </div>
            <div class="mdl-color-text--grey-700 mdl-card__supporting-text meta">
            </div>
            <div class="mdl-color-text--grey-700 mdl-card__supporting-text">
              <p>
                <!--login forum-->
                <!-- Simple Textfield -->
            <?php 
    echo "{$message}";
    // to display any specific message before login
    $usn = @$_POST['usn'];
    $password = @$_POST['password'];
    if (isset($usn) && isset($password)) {
        if (!empty($usn) && !empty($password)) {
            include 'dbms/dbms_imp.php';
            $email = netutralize($usn, $connection);
            mysqli_close($connection);
            $login_user = new login($usn, $password);
        } else {
            echo "All fields are necessary";
        }
    }
    $current_file = $_SERVER['SCRIPT_NAME'];
    ?>
                <form action="<?php 
    echo $current_file;
    ?>
" method="POST" enctype="" target="">
                  <div class="mdl-textfield mdl-js-textfield">
                    <fieldset>
                      <legend>USN:</legend>
                      <input class="mdl-textfield__input" id="usn" type="text" name="usn" value="<?php 
    if (isset($usn)) {
        echo "{$usn}";
    }
    ?>
">
                      <!--<label class="mdl-textfield__label" for="usn">usn</label>-->
                    </fieldset>
                    <br/>
                    <fieldset>
                      <legend>Password :</legend>
                      <input class="mdl-textfield__input" id="password" type="password" name="password" value="">
                      <!--<label class="mdl-textfield__label" for="password">password</label>-->
                    </fieldset>
                    <!--<input type="submit" name="log in" value="log in" size="5">-->
                    <!-- Flat button -->
                    <div class="mdl-color-text--grey-700 mdl-card__supporting-text meta">
                    <button class="mdl-button mdl-js-button">
                      Login
                    </button>
                    </div>
                  </div>
                </form>
              </p>
            </div>
            <div class="mdl-color-text--grey-700 mdl-card__supporting-text meta">
              <div class="section-spacer"></div>
              <div>
                <strong>
                  New here. Register <a href="register">here.</a>
                </strong>
              </div>
               <div class="section-spacer"></div>
            </div>  
          </div>

<?php 
}
Example #3
0
$add = false;
//user is not added
// if the post data is set
if (isset($fname) && isset($lname) && isset($gender) && isset($dob) && isset($usn) && isset($password) && isset($password_re)) {
    if (!empty($fname) && !empty($lname) && !empty($gender) && !empty($dob) && !empty($usn) && !empty($password) && !empty($password_re)) {
        // check both password is same or not
        $pass = true;
        //by default checking assume that the data inputed is Valid
        // validate the data using validate function
        // neutralizing the data
        include 'dbms/dbms_imp.php';
        $fname = netutralize($fname, $connection);
        $lname = netutralize($lname, $connection);
        $gender = netutralize($gender, $connection);
        $dob = netutralize($dob, $connection);
        $usn = netutralize($usn, $connection);
        mysqli_close($connection);
        // check for password match
        if ($password != $password_re) {
            $pass = false;
        }
        // if the usn already exists
        if (read_db_entry($usn, 'usn', 'userdetail')) {
            $pass = false;
            //echo "OOP's It seems the usn already is beign used by someone else." ;
        }
        // if all data inputed is correct then give this data to register class to register the user
        if ($pass) {
            $reg_user = new register($password);
            $reg_user->fname = $fname;
            $reg_user->lname = $lname;
Example #4
0
 if (!empty($title) && !empty($cat) && !empty($tags) && !empty($bref) && !empty($desc)) {
     $pass = true;
     //by default checking assume that the data inputed is Valid
     // validate the data using validate function
     // neutralizing the data
     include 'dbms/dbms_imp.php';
     $title = netutralize($title, $connection);
     $cat = netutralize($cat, $connection);
     $tags = netutralize($tags, $connection);
     $bref = netutralize($bref, $connection);
     $desc = netutralize($desc, $connection);
     if (isset($piroity) && !empty($piroity)) {
         $piroity = netutralize($piroity, $connection);
     }
     if (isset($exlink) && !empty($exlink)) {
         $exlink = netutralize($exlink, $connection);
     }
     if (isset($img) && !empty($img)) {
         //netutralization script for it
     }
     mysqli_close($connection);
     // contitions to check the input data
     // if all data inputed is correct then give this data to register class to register the user
     if ($pass) {
         $add_notice = new addnotice();
         $add_notice->title = $title;
         $add_notice->cat = $cat;
         $add_notice->tags = $tags;
         $add_notice->bref = $bref;
         $add_notice->description = $desc;
         if (isset($piroity) && !empty($piroity)) {