A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Re: Re: Re: Re: Re: Re: Re: mhcc - Stikked
From david, 10 Years ago, written in HTML5.
This paste is a reply to Re: Re: Re: Re: Re: Re: mhcc from david - go back
Embed
case 'create':
        $formValid = true;

        if (isset($_POST["create"])) {
            
            $salt     = md5(APP_SECRET . date('Ymdhis'));
            $password = md5( $salt . $_POST["password"] );
            $active   = (isset($_POST["active"])) ? true : false;
            $locked   = (isset($_POST["locked"])) ? true : false;

            $sql = "INSERT INTO
                      auth_user
                    (username, email, password, salt, first_name, last_name, active, locked)
                    VALUES
                    (?, ?, ?, ?, ?, ?, ?, ?)";

            $dbObj = new db();
            $dbObj->dbPrepare( $sql );
            $dbObj->dbExecute(array(
                $_POST["username"],
                $_POST["email"],
                $password,
                $salt,
                $_POST["firstname"],
                $_POST["lastname"],
                $active,
                $locked
            ));
        }
        else {
            $formValid = false;            
        }

        if ($formValid) {
            $sql = "SELECT
                      *
                    FROM
                      auth_user
                    ORDER BY
                      username";

            $dbObj = new db();
            $dbObj->dbPrepare( $sql );
            $dbObj->dbExecute();

            include( APP_VIEW .'/user/userSubNav.php' );
            include( APP_VIEW .'/user/listView.php' );
            break;
        }
        else {
            include( APP_VIEW .'/user/userSubNav.php' );
            include( APP_VIEW .'/user/addView.php' );
            break;            
        }
        <!-- page content -->
        <div class="col-md-9">
          <div class="pageContent">

          <form method="post" action="<?php print APP_DOC_ROOT; ?>/user/create">
            <div class="form-group">
              <label for="username">Username</label>
              <input type="text" class="form-control" id="username" name="username" placeholder="Enter username">
            </div>
            <div class="form-group">
              <label for="email">Email</label>
              <input type="email" class="form-control" id="email" name="email" placeholder="Enter email">
            </div>
            <div class="form-group">
              <label for="firstname">First Name</label>
              <input type="text" class="form-control" id="firstname" name="firstname" placeholder="Enter first name">
            </div>
            <div class="form-group">
              <label for="lastname">Last Name</label>
              <input type="text" class="form-control" id="lastname" name="lastname" placeholder="Enter last name">
            </div>
            <div class="form-group">
              <label for="password">Password</label>
              <input type="password" class="form-control" id="password" name="password" placeholder="Enter password">
            </div>
            <div class="checkbox">
              <label>
                <input type="checkbox" id="active" name="active" value="true"> Active
              </label>
            </div>
            <div class="checkbox">
              <label>
                <input type="checkbox" id="locked" name="locked" value="true"> Locked
              </label>
            </div>
            <button type="submit" id="create" name="create" value="true" class="btn btn-default">
              <span class="fa fa-check"></span> Create
            </button>
          </form>

           </div>
        </div>
        <!-- end page content -->

Replies to Re: Re: Re: Re: Re: Re: Re: mhcc rss

Title Name Language When
Re: Re: Re: Re: Re: Re: Re: Re: mhcc david php 10 Years ago.