[DEV] PixableCMS - Blogging Edition [DEV]

Status
Not open for further replies.

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
PixableCMS is an amazing blogging cms,
it has load of features a regular blogging system does not have

Features:
  • Clean & Fast Code.
  • Simple MYSQL & Small Database.
  • Quick & Simple Login & User System
  • Pages code so easy to read
Soon to Come:
  • Housekeeping [Write articles, ect.]
Progress:
85-100% Complete: [x]
60-84% Complete: [x]
5-60% Complete: [x]
  • /Content [x]
  • /login_panel [x]
  • account.php [x]
  • connect.php [x]
  • demo.css [x]
  • functions.php [x]
  • index.php [x]
  • news.php [x]
  • registered.php [x]
  • staff.php [x]
  • pwchange.php [x]
Its just a simple 2 Folders, with a total of 9 Pages :]

Code Snippets:
index.php
PHP:
<?php
 
define('INCLUDE_CHECK',true);
 
require 'connect.php';
require 'functions.php';
// Those two files can be included only if INCLUDE_CHECK is defined
 
 
session_name('tzLogin');
// Starting the session
 
session_set_cookie_params(2*7*24*60*60);
// Making the cookie live for 2 weeks
 
session_start();
 
if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe'])
{
    // If you are logged in, but you don't have the tzRemember cookie (browser restart)
    // and you have not checked the rememberMe checkbox:
 
    $_SESSION = array();
    session_destroy();
 
    // Destroy the session
}
 
 
if(isset($_GET['logoff']))
{
    $_SESSION = array();
    session_destroy();
 
    header("Location: index.php");
    exit;
}
 
if($_POST['submit']=='Login')
{
    // Checking whether the Login form has been submitted
 
    $err = array();
    // Will hold our errors
 
 
    if(!$_POST['usr'] || !$_POST['pass'])
        $err[] = 'All the fields must be filled in!';
 
    if(!count($err))
    {
        $_POST['usr'] = mysql_real_escape_string($_POST['usr']);
        $_POST['pass'] = mysql_real_escape_string($_POST['pass']);
        $_POST['rememberMe'] = (int)$_POST['rememberMe'];
   
        // Escaping all input data
 
        $row = mysql_fetch_assoc(mysql_query("SELECT id,usr FROM tz_members WHERE usr='{$_POST['usr']}' AND pass='".md5($_POST['pass'])."'"));
 
        if($row['usr'])
        {
            // If everything is OK login
       
            $_SESSION['usr']=$row['usr'];
            $_SESSION['id'] = $row['id'];
            $_SESSION['rememberMe'] = $_POST['rememberMe'];
       
            // Store some data in the session
       
            setcookie('tzRemember',$_POST['rememberMe']);
        }
        else $err[]='Wrong Username and/or pass!';
    }
 
    if($err)
    $_SESSION['msg']['login-err'] = implode('<br />',$err);
    // Save the error messages in the session
 
    header("Location: index.php");
    exit;
}
else if($_POST['submit']=='Register')
{
    // If the Register form has been submitted
 
    $err = array();
 
    if(strlen($_POST['usr'])<4 || strlen($_POST['usr'])>32)
    {
        $err[]='Your username must be between 3 and 32 characters!';
    }
 
    if(preg_match('/[^a-z0-9\-\_\.]+/i',$_POST['usr']))
    {
        $err[]='Your username contains invalid characters!';
    }
 
    if(!checkEmail($_POST['email']))
    {
        $err[]='Your email is not valid!';
    }
 
    if(!count($err))
    {
        // If there are no errors
   
        $pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
        // Generate a random pass
   
        $_POST['email'] = mysql_real_escape_string($_POST['email']);
        $_POST['usr'] = mysql_real_escape_string($_POST['usr']);
        // Escape the input data
   
   
        mysql_query("    INSERT INTO tz_members(usr,pass,email,regIP,dt)
                        VALUES(
                   
                            '".$_POST['usr']."',
                            '".md5($pass)."',
                            '".$_POST['email']."',
                            '".$_SERVER['REMOTE_ADDR']."',
                            NOW()
                       
                        )");
   
        if(mysql_affected_rows($link)==1)
        {
            send_mail(    '',
                        $_POST['email'],
                        'Registration System Demo - Your New Password',
                        'Your pass is: '.$pass);
 
            $_SESSION['msg']['reg-success']='We sent you an email with your new pass!';
        }
        else $err[]='This username is already taken!';
    }
 
    if(count($err))
    {
        $_SESSION['msg']['reg-err'] = implode('<br />',$err);
    }
 
    header("Location: index.php");
    exit;
}
 
$script = '';
 
if($_SESSION['msg'])
{
    // The script below shows the sliding panel on page load
 
    $script = '
    <script type="text/javascript">
 
        $(function(){
   
            $("div#panel").show();
            $("#toggle a").toggle();
        });
 
    </script>';
 
}
?>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PixableCMS - Demo Hotel</title>
 
    <link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" />
 
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
 
    <!-- PNG FIX for IE6 -->
    <!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
    <!--[if lte IE 6]>
        <script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
    <![endif]-->
 
    <script src="login_panel/js/slide.js" type="text/javascript"></script>
 
    <?php echo $script; ?>
</head>
 
<body>
 
<!-- Panel -->
<div id="toppanel">
    <div id="panel">
        <div class="content clearfix">
            <div class="left">
                <h1>PixableCMS</h1>
                <h2>A Blogging CMS Solution</h2>   
                <p class="grey">You are free to use this CMS on your sites!</p>
                <h2>A Big Thanks</h2>
                <p class="grey">Sheldos for Theme<br/>and<br/>EthanRaadley for Code.</p>
            </div>
       
       
            <?php
       
            if(!$_SESSION['id']):
       
            ?>
       
            <div class="left">
                <!-- Login Form -->
                <form class="clearfix" action="" method="post">
                    <h1>Member Login</h1>
               
                    <?php
                   
                        if($_SESSION['msg']['login-err'])
                        {
                            echo '<div class="err">'.$_SESSION['msg']['login-err'].'</div>';
                            unset($_SESSION['msg']['login-err']);
                        }
                    ?>
               
                    <label class="grey" for="usr">Username:</label>
                    <input class="field" type="text" name="usr" id="usr" value="" size="23" />
                    <label class="grey" for="pass">Password:</label>
                    <input class="field" type="password" name="pass" id="pass" size="23" />
                    <label><input name="rememberMe" id="rememberMe" type="checkbox" checked="checked" value="1" /> &nbsp;Remember me</label>
                    <div class="clear"></div>
                    <input type="submit" name="submit" value="Login" class="bt_login" />
                </form>
            </div>
            <div class="left right">       
                <!-- Register Form -->
                <form action="" method="post">
                    <h1>Not a member yet? Sign Up!</h1>   
               
                    <?php
                   
                        if($_SESSION['msg']['reg-err'])
                        {
                            echo '<div class="err">'.$_SESSION['msg']['reg-err'].'</div>';
                            unset($_SESSION['msg']['reg-err']);
                        }
                   
                        if($_SESSION['msg']['reg-success'])
                        {
                            echo '<div class="success">'.$_SESSION['msg']['reg-success'].'</div>';
                            unset($_SESSION['msg']['reg-success']);
                        }
                    ?>
                       
                    <label class="grey" for="usr">Username:</label>
                    <input class="field" type="text" name="usr" id="usr" value="" size="23" />
                    <label class="grey" for="email">Email:</label>
                    <input class="field" type="text" name="email" id="email" size="23" />
                    <label>A pass will be e-mailed to you with your password.</label>
                    <input type="submit" name="submit" value="Register" class="bt_register" />
                </form>
            </div>
       
            <?php
       
            else:
       
            ?>
       
            <div class="left">
       
       
            <meta http-equiv="REFRESH" content="0;url=account.php">
       
            </div>
       
            <div class="left right">
            </div>
       
            <?php
            endif;
            ?>
        </div>
    </div> <!-- /login -->
 
    <!-- The tab on top -->
    <div class="tab">
        <ul class="login">
            <li class="left">&nbsp;</li>
            <li>Hello <?php echo $_SESSION['usr'] ? $_SESSION['usr']: 'Guest';?>!</li>
            <li class="sep">|</li>
            <li id="toggle">
                <a id="open" class="open" href="#"><?php echo $_SESSION['id']?'Open Panel':'Log In | Register';?></a>
                <a id="close" style="display: none;" class="close" href="#">Close Panel</a>       
            </li>
            <li class="right">&nbsp;</li>
        </ul>
    </div> <!-- / top -->
 
</div> <!--panel -->
 
<html>
 
<head>
<title>PixableCMS - Demo CMS</title>
<link rel="stylesheet" type="text/css" media="screen" href="Content/Styles/First.css" />
    <script type="text/javascript" src="../ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
 
 
 
    </head>
 
<body>
<br/><br/><br/><br/><br/><br/>
<center><div id="Container">
<div class="Header">PixableCMS:</div>
Welcome to the PixableCMS Demo Hotel,<br/>
we hope you enjoy your time exploring this site <3<br/>
Feel Free to PM EthanRaadley @ Devbest For Any
Bugs You See!<br/>
</div></center><br /><br />
</body>
 
 
<center><div id="Container">Copyright &copy; Sheldos for theme & Ethan for code</div></center>
</html>

registered.php
PHP:
<?php
 
session_name('tzLogin');
session_set_cookie_params(2*7*24*60*60);
session_start();
?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Registered users only! </title>
 
    <link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
 
</head>
 
<body>
 
<div id="main">
  <div class="container">
    <h1>Registered Users Only!</h1>
    <h2>Login to view this resource!</h2>
    </div>
 
    <div class="container">
 
    <?php
    if($_SESSION['id'])
    echo '<h1>Hello, '.$_SESSION['usr'].'! You are registered and logged in!</h1>';
    else echo '<h1>Please, <a href="demo.php">login</a> and come back later!</h1>';
    ?>
    </div>
 
  <div class="container tutorial-info">
</div>
 
 
</body>
</html>

Website:

It will send an email to ANY email except yahoo.

If you see any exploit or bugs,
please report them to me


Release 1:
 

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
Update:
Demo website's user system bug is fixed, 
Some fag hacked my hotel,
I will release early,
[News is only through db atm]
[Staff & Change password will be coded for v1.1]

[Credits to fag (sheldos) for giving me theme and hacking my hotel!]
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,194
3,901
Hey,

Are you going to give any credit? I think you should!






They're all similar! Or the same!
 

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
Hey,

Are you going to give any credit? I think you should!






They're all similar! Or the same!

Credits,
i used that but fixed the code
CODE is: usr & pass
it was all username & password
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
"Fixed the code", tbh i doubt very highly that is needed fixing
 

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
Original:
PHP:
<?php
 
define('INCLUDE_CHECK',true);
 
require 'connect.php';
require 'functions.php';
// Those two files can be included only if INCLUDE_CHECK is defined
 
 
session_name('tzLogin');
// Starting the session
 
session_set_cookie_params(2*7*24*60*60);
// Making the cookie live for 2 weeks
 
session_start();
 
if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe'])
{
    // If you are logged in, but you don't have the tzRemember cookie (browser restart)
    // and you have not checked the rememberMe checkbox:
 
    $_SESSION = array();
    session_destroy();
   
    // Destroy the session
}
 
 
if(isset($_GET['logoff']))
{
    $_SESSION = array();
    session_destroy();
   
    header("Location: demo.php");
    exit;
}
 
if($_POST['submit']=='Login')
{
    // Checking whether the Login form has been submitted
   
    $err = array();
    // Will hold our errors
   
   
    if(!$_POST['username'] || !$_POST['password'])
        $err[] = 'All the fields must be filled in!';
   
    if(!count($err))
    {
        $_POST['username'] = mysql_real_escape_string($_POST['username']);
        $_POST['password'] = mysql_real_escape_string($_POST['password']);
        $_POST['rememberMe'] = (int)$_POST['rememberMe'];
       
        // Escaping all input data
 
        $row = mysql_fetch_assoc(mysql_query("SELECT id,usr FROM tz_members WHERE usr='{$_POST['username']}' AND pass='".md5($_POST['password'])."'"));
 
        if($row['usr'])
        {
            // If everything is OK login
           
            $_SESSION['usr']=$row['usr'];
            $_SESSION['id'] = $row['id'];
            $_SESSION['rememberMe'] = $_POST['rememberMe'];
           
            // Store some data in the session
           
            setcookie('tzRemember',$_POST['rememberMe']);
        }
        else $err[]='Wrong username and/or password!';
    }
   
    if($err)
    $_SESSION['msg']['login-err'] = implode('<br />',$err);
    // Save the error messages in the session
 
    header("Location: demo.php");
    exit;
}
else if($_POST['submit']=='Register')
{
    // If the Register form has been submitted
   
    $err = array();
   
    if(strlen($_POST['username'])<4 || strlen($_POST['username'])>32)
    {
        $err[]='Your username must be between 3 and 32 characters!';
    }
   
    if(preg_match('/[^a-z0-9\-\_\.]+/i',$_POST['username']))
    {
        $err[]='Your username contains invalid characters!';
    }
   
    if(!checkEmail($_POST['email']))
    {
        $err[]='Your email is not valid!';
    }
   
    if(!count($err))
    {
        // If there are no errors
       
        $pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
        // Generate a random password
       
        $_POST['email'] = mysql_real_escape_string($_POST['email']);
        $_POST['username'] = mysql_real_escape_string($_POST['username']);
        // Escape the input data
       
       
        mysql_query("    INSERT INTO tz_members(usr,pass,email,regIP,dt)
                        VALUES(
                       
                            '".$_POST['username']."',
                            '".md5($pass)."',
                            '".$_POST['email']."',
                            '".$_SERVER['REMOTE_ADDR']."',
                            NOW()
                           
                        )");
       
        if(mysql_affected_rows($link)==1)
        {
            send_mail(    '[email protected]',
                        $_POST['email'],
                        'Registration System Demo - Your New Password',
                        'Your password is: '.$pass);
 
            $_SESSION['msg']['reg-success']='We sent you an email with your new password!';
        }
        else $err[]='This username is already taken!';
    }
 
    if(count($err))
    {
        $_SESSION['msg']['reg-err'] = implode('<br />',$err);
    }   
   
    header("Location: demo.php");
    exit;
}
 
$script = '';
 
if($_SESSION['msg'])
{
    // The script below shows the sliding panel on page load
   
    $script = '
    <script type="text/javascript">
   
        $(function(){
       
            $("div#panel").show();
            $("#toggle a").toggle();
        });
   
    </script>';
   
}
?>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>A Cool Login System With PHP MySQL &amp jQuery | Tutorialzine demo</title>
   
    <link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" />
   
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
   
    <!-- PNG FIX for IE6 -->
    <!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
    <!--[if lte IE 6]>
        <script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
    <![endif]-->
   
    <script src="login_panel/js/slide.js" type="text/javascript"></script>
   
    <?php echo $script; ?>
</head>
 
<body>
 
<!-- Panel -->
<div id="toppanel">
    <div id="panel">
        <div class="content clearfix">
            <div class="left">
                <h1>The Sliding jQuery Panel</h1>
                <h2>A register/login solution</h2>       
                <p class="grey">You are free to use this login and registration system in you sites!</p>
                <h2>A Big Thanks</h2>
                <p class="grey">This tutorial was built on top of <a href="http://web-kreation.com/index.php/tutorials/nice-clean-sliding-login-panel-built-with-jquery" title="Go to site">Web-Kreation</a>'s amazing sliding panel.</p>
            </div>
           
           
            <?php
           
            if(!$_SESSION['id']):
           
            ?>
           
            <div class="left">
                <!-- Login Form -->
                <form class="clearfix" action="" method="post">
                    <h1>Member Login</h1>
                   
                    <?php
                       
                        if($_SESSION['msg']['login-err'])
                        {
                            echo '<div class="err">'.$_SESSION['msg']['login-err'].'</div>';
                            unset($_SESSION['msg']['login-err']);
                        }
                    ?>
                   
                    <label class="grey" for="username">Username:</label>
                    <input class="field" type="text" name="username" id="username" value="" size="23" />
                    <label class="grey" for="password">Password:</label>
                    <input class="field" type="password" name="password" id="password" size="23" />
                    <label><input name="rememberMe" id="rememberMe" type="checkbox" checked="checked" value="1" /> &nbsp;Remember me</label>
                    <div class="clear"></div>
                    <input type="submit" name="submit" value="Login" class="bt_login" />
                </form>
            </div>
            <div class="left right">           
                <!-- Register Form -->
                <form action="" method="post">
                    <h1>Not a member yet? Sign Up!</h1>       
                   
                    <?php
                       
                        if($_SESSION['msg']['reg-err'])
                        {
                            echo '<div class="err">'.$_SESSION['msg']['reg-err'].'</div>';
                            unset($_SESSION['msg']['reg-err']);
                        }
                       
                        if($_SESSION['msg']['reg-success'])
                        {
                            echo '<div class="success">'.$_SESSION['msg']['reg-success'].'</div>';
                            unset($_SESSION['msg']['reg-success']);
                        }
                    ?>
                           
                    <label class="grey" for="username">Username:</label>
                    <input class="field" type="text" name="username" id="username" value="" size="23" />
                    <label class="grey" for="email">Email:</label>
                    <input class="field" type="text" name="email" id="email" size="23" />
                    <label>A password will be e-mailed to you.</label>
                    <input type="submit" name="submit" value="Register" class="bt_register" />
                </form>
            </div>
           
            <?php
           
            else:
           
            ?>
           
            <div class="left">
           
            <h1>Members panel</h1>
           
            <p>You can put member-only data here</p>
            <a href="registered.php">View a special member page</a>
            <p>- or -</p>
            <a href="?logoff">Log off</a>
           
            </div>
           
            <div class="left right">
            </div>
           
            <?php
            endif;
            ?>
        </div>
    </div> <!-- /login -->   
 
    <!-- The tab on top -->   
    <div class="tab">
        <ul class="login">
            <li class="left">&nbsp;</li>
            <li>Hello <?php echo $_SESSION['usr'] ? $_SESSION['usr'] : 'Guest';?>!</li>
            <li class="sep">|</li>
            <li id="toggle">
                <a id="open" class="open" href="#"><?php echo $_SESSION['id']?'Open Panel':'Log In | Register';?></a>
                <a id="close" style="display: none;" class="close" href="#">Close Panel</a>           
            </li>
            <li class="right">&nbsp;</li>
        </ul>
    </div> <!-- / top -->
   
</div> <!--panel -->
Mine:
PHP:
<?php
 
define('INCLUDE_CHECK',true);
 
require 'connect.php';
require 'functions.php';
// Those two files can be included only if INCLUDE_CHECK is defined
 
 
session_name('tzLogin');
// Starting the session
 
session_set_cookie_params(2*7*24*60*60);
// Making the cookie live for 2 weeks
 
session_start();
 
if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe'])
{
// If you are logged in, but you don't have the tzRemember cookie (browser restart)
// and you have not checked the rememberMe checkbox:
 
$_SESSION = array();
session_destroy();
 
// Destroy the session
}
 
 
if(isset($_GET['logoff']))
{
$_SESSION = array();
session_destroy();
 
header("Location: index.php");
exit;
}
 
if($_POST['submit']=='Login')
{
// Checking whether the Login form has been submitted
 
$err = array();
// Will hold our errors
 
 
if(!$_POST['usr'] || !$_POST['pass'])
$err[] = 'All the fields must be filled in!';
 
if(!count($err))
{
$_POST['usr'] = mysql_real_escape_string($_POST['usr']);
$_POST['pass'] = mysql_real_escape_string($_POST['pass']);
$_POST['rememberMe'] = (int)$_POST['rememberMe'];
 
// Escaping all input data
 
$row = mysql_fetch_assoc(mysql_query("SELECT id,usr FROM tz_members WHERE usr='{$_POST['usr']}' AND pass='".md5($_POST['pass'])."'"));
 
if($row['usr'])
{
// If everything is OK login
 
$_SESSION['usr']=$row['usr'];
$_SESSION['id'] = $row['id'];
$_SESSION['rememberMe'] = $_POST['rememberMe'];
 
// Store some data in the session
 
setcookie('tzRemember',$_POST['rememberMe']);
}
else $err[]='Wrong Username and/or pass!';
}
 
if($err)
$_SESSION['msg']['login-err'] = implode('<br />',$err);
// Save the error messages in the session
 
header("Location: index.php");
exit;
}
else if($_POST['submit']=='Register')
{
// If the Register form has been submitted
 
$err = array();
 
if(strlen($_POST['usr'])<4 || strlen($_POST['usr'])>32)
{
$err[]='Your username must be between 3 and 32 characters!';
}
 
if(preg_match('/[^a-z0-9\-\_\.]+/i',$_POST['usr']))
{
$err[]='Your username contains invalid characters!';
}
 
if(!checkEmail($_POST['email']))
{
$err[]='Your email is not valid!';
}
 
if(!count($err))
{
// If there are no errors
 
$pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
// Generate a random pass
 
$_POST['email'] = mysql_real_escape_string($_POST['email']);
$_POST['usr'] = mysql_real_escape_string($_POST['usr']);
// Escape the input data
 
 
mysql_query("INSERT INTO tz_members(usr,pass,email,regIP,dt)
VALUES(
 
'".$_POST['usr']."',
'".md5($pass)."',
'".$_POST['email']."',
'".$_SERVER['REMOTE_ADDR']."',
NOW()
 
)");
 
if(mysql_affected_rows($link)==1)
{
send_mail('',
$_POST['email'],
'Registration System Demo - Your New Password',
'Your pass is: '.$pass);
 
$_SESSION['msg']['reg-success']='We sent you an email with your new pass!';
}
else $err[]='This username is already taken!';
}
 
if(count($err))
{
$_SESSION['msg']['reg-err'] = implode('<br />',$err);
}
 
header("Location: index.php");
exit;
}
 
$script = '';
 
if($_SESSION['msg'])
{
// The script below shows the sliding panel on page load
 
$script = '
<script type="text/javascript">
 
$(function(){
 
$("div#panel").show();
$("#toggle a").toggle();
});
 
</script>';
 
}
?>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PixableCMS - Demo Blogging System</title>
    
    <link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" />
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    
    <!-- PNG FIX for IE6 -->
    <!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
    <!--[if lte IE 6]>
        <script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
    <![endif]-->
    
    <script src="login_panel/js/slide.js" type="text/javascript"></script>
    
    <?php echo $script; ?>
</head>
 
<body>
 
<!-- Panel -->
<div id="toppanel">
<div id="panel">
<div class="content clearfix">
<div class="left">
<h1>PixableCMS</h1>
<h2>A Blogging CMS Solution</h2>
<p class="grey">You are free to use this CMS on your sites!</p>
<h2>A Big Thanks</h2>
<p class="grey">Sheldos for Theme<br/>and<br/>EthanRaadley for Code.</p>
</div>
            
            
            <?php
 
if(!$_SESSION['id']):
 
?>
            
<div class="left">
<!-- Login Form -->
<form class="clearfix" action="" method="post">
<h1>Member Login</h1>
                    
                    <?php
 
if($_SESSION['msg']['login-err'])
{
echo '<div class="err">'.$_SESSION['msg']['login-err'].'</div>';
unset($_SESSION['msg']['login-err']);
}
?>
 
<label class="grey" for="usr">Username:</label>
<input class="field" type="text" name="usr" id="usr" value="" size="23" />
<label class="grey" for="pass">Password:</label>
<input class="field" type="password" name="pass" id="pass" size="23" />
           <label><input name="rememberMe" id="rememberMe" type="checkbox" checked="checked" value="1" /> &nbsp;Remember me</label>
       <div class="clear"></div>
<input type="submit" name="submit" value="Login" class="bt_login" />
</form>
</div>
<div class="left right">
<!-- Register Form -->
<form action="" method="post">
<h1>Not a member yet? Sign Up!</h1>
                    
                    <?php
 
if($_SESSION['msg']['reg-err'])
{
echo '<div class="err">'.$_SESSION['msg']['reg-err'].'</div>';
unset($_SESSION['msg']['reg-err']);
}
 
if($_SESSION['msg']['reg-success'])
{
echo '<div class="success">'.$_SESSION['msg']['reg-success'].'</div>';
unset($_SESSION['msg']['reg-success']);
}
?>
                   
<label class="grey" for="usr">Username:</label>
<input class="field" type="text" name="usr" id="usr" value="" size="23" />
<label class="grey" for="email">Email:</label>
<input class="field" type="text" name="email" id="email" size="23" />
<label>A pass will be e-mailed to you with your password.</label>
<input type="submit" name="submit" value="Register" class="bt_register" />
</form>
</div>
            
            <?php
 
else:
 
?>
            
            <div class="left">
            
            
            <meta http-equiv="REFRESH" content="0;url=account.php">
            
            </div>
            
            <div class="left right">
            </div>
            
            <?php
endif;
?>
</div>
</div> <!-- /login -->
 
    <!-- The tab on top -->
<div class="tab">
<ul class="login">
   <li class="left">&nbsp;</li>
       <li>Hello <?php echo $_SESSION['usr'] ? $_SESSION['usr']: 'Guest';?>!</li>
<li class="sep">|</li>
<li id="toggle">
<a id="open" class="open" href="#"><?php echo $_SESSION['id']?'Open Panel':'Log In | Register';?></a>
<a id="close" style="display: none;" class="close" href="#">Close Panel</a>
</li>
   <li class="right">&nbsp;</li>
</ul> 
</div> <!-- / top -->
 
</div> <!--panel -->
See a difference?
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,194
3,901

Credits,
i used that but fixed the code
CODE is: usr & pass
it was all username & password

Not much has been 'fixed' compare both of them, and you still get similar results, even same database structure;



You have basically taken all of that page, lmfao.

Original:
PHP:
<?php
 
define('INCLUDE_CHECK',true);
 
require 'connect.php';
require 'functions.php';
// Those two files can be included only if INCLUDE_CHECK is defined
 
 
session_name('tzLogin');
// Starting the session
 
session_set_cookie_params(2*7*24*60*60);
// Making the cookie live for 2 weeks
 
session_start();
 
if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe'])
{
    // If you are logged in, but you don't have the tzRemember cookie (browser restart)
    // and you have not checked the rememberMe checkbox:
 
    $_SESSION = array();
    session_destroy();
 
    // Destroy the session
}
 
 
if(isset($_GET['logoff']))
{
    $_SESSION = array();
    session_destroy();
 
    header("Location: demo.php");
    exit;
}
 
if($_POST['submit']=='Login')
{
    // Checking whether the Login form has been submitted
 
    $err = array();
    // Will hold our errors
 
 
    if(!$_POST['username'] || !$_POST['password'])
        $err[] = 'All the fields must be filled in!';
 
    if(!count($err))
    {
        $_POST['username'] = mysql_real_escape_string($_POST['username']);
        $_POST['password'] = mysql_real_escape_string($_POST['password']);
        $_POST['rememberMe'] = (int)$_POST['rememberMe'];
   
        // Escaping all input data
 
        $row = mysql_fetch_assoc(mysql_query("SELECT id,usr FROM tz_members WHERE usr='{$_POST['username']}' AND pass='".md5($_POST['password'])."'"));
 
        if($row['usr'])
        {
            // If everything is OK login
       
            $_SESSION['usr']=$row['usr'];
            $_SESSION['id'] = $row['id'];
            $_SESSION['rememberMe'] = $_POST['rememberMe'];
       
            // Store some data in the session
       
            setcookie('tzRemember',$_POST['rememberMe']);
        }
        else $err[]='Wrong username and/or password!';
    }
 
    if($err)
    $_SESSION['msg']['login-err'] = implode('<br />',$err);
    // Save the error messages in the session
 
    header("Location: demo.php");
    exit;
}
else if($_POST['submit']=='Register')
{
    // If the Register form has been submitted
 
    $err = array();
 
    if(strlen($_POST['username'])<4 || strlen($_POST['username'])>32)
    {
        $err[]='Your username must be between 3 and 32 characters!';
    }
 
    if(preg_match('/[^a-z0-9\-\_\.]+/i',$_POST['username']))
    {
        $err[]='Your username contains invalid characters!';
    }
 
    if(!checkEmail($_POST['email']))
    {
        $err[]='Your email is not valid!';
    }
 
    if(!count($err))
    {
        // If there are no errors
   
        $pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
        // Generate a random password
   
        $_POST['email'] = mysql_real_escape_string($_POST['email']);
        $_POST['username'] = mysql_real_escape_string($_POST['username']);
        // Escape the input data
   
   
        mysql_query("    INSERT INTO tz_members(usr,pass,email,regIP,dt)
                        VALUES(
                   
                            '".$_POST['username']."',
                            '".md5($pass)."',
                            '".$_POST['email']."',
                            '".$_SERVER['REMOTE_ADDR']."',
                            NOW()
                       
                        )");
   
        if(mysql_affected_rows($link)==1)
        {
            send_mail(    '[email protected]',
                        $_POST['email'],
                        'Registration System Demo - Your New Password',
                        'Your password is: '.$pass);
 
            $_SESSION['msg']['reg-success']='We sent you an email with your new password!';
        }
        else $err[]='This username is already taken!';
    }
 
    if(count($err))
    {
        $_SESSION['msg']['reg-err'] = implode('<br />',$err);
    }
 
    header("Location: demo.php");
    exit;
}
 
$script = '';
 
if($_SESSION['msg'])
{
    // The script below shows the sliding panel on page load
 
    $script = '
    <script type="text/javascript">
 
        $(function(){
   
            $("div#panel").show();
            $("#toggle a").toggle();
        });
 
    </script>';
 
}
?>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>A Cool Login System With PHP MySQL &amp jQuery | Tutorialzine demo</title>
 
    <link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" />
 
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
 
    <!-- PNG FIX for IE6 -->
    <!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
    <!--[if lte IE 6]>
        <script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
    <![endif]-->
 
    <script src="login_panel/js/slide.js" type="text/javascript"></script>
 
    <?php echo $script; ?>
</head>
 
<body>
 
<!-- Panel -->
<div id="toppanel">
    <div id="panel">
        <div class="content clearfix">
            <div class="left">
                <h1>The Sliding jQuery Panel</h1>
                <h2>A register/login solution</h2>   
                <p class="grey">You are free to use this login and registration system in you sites!</p>
                <h2>A Big Thanks</h2>
                <p class="grey">This tutorial was built on top of <a href="http://web-kreation.com/index.php/tutorials/nice-clean-sliding-login-panel-built-with-jquery" title="Go to site">Web-Kreation</a>'s amazing sliding panel.</p>
            </div>
       
       
            <?php
       
            if(!$_SESSION['id']):
       
            ?>
       
            <div class="left">
                <!-- Login Form -->
                <form class="clearfix" action="" method="post">
                    <h1>Member Login</h1>
               
                    <?php
                   
                        if($_SESSION['msg']['login-err'])
                        {
                            echo '<div class="err">'.$_SESSION['msg']['login-err'].'</div>';
                            unset($_SESSION['msg']['login-err']);
                        }
                    ?>
               
                    <label class="grey" for="username">Username:</label>
                    <input class="field" type="text" name="username" id="username" value="" size="23" />
                    <label class="grey" for="password">Password:</label>
                    <input class="field" type="password" name="password" id="password" size="23" />
                    <label><input name="rememberMe" id="rememberMe" type="checkbox" checked="checked" value="1" /> &nbsp;Remember me</label>
                    <div class="clear"></div>
                    <input type="submit" name="submit" value="Login" class="bt_login" />
                </form>
            </div>
            <div class="left right">       
                <!-- Register Form -->
                <form action="" method="post">
                    <h1>Not a member yet? Sign Up!</h1>   
               
                    <?php
                   
                        if($_SESSION['msg']['reg-err'])
                        {
                            echo '<div class="err">'.$_SESSION['msg']['reg-err'].'</div>';
                            unset($_SESSION['msg']['reg-err']);
                        }
                   
                        if($_SESSION['msg']['reg-success'])
                        {
                            echo '<div class="success">'.$_SESSION['msg']['reg-success'].'</div>';
                            unset($_SESSION['msg']['reg-success']);
                        }
                    ?>
                       
                    <label class="grey" for="username">Username:</label>
                    <input class="field" type="text" name="username" id="username" value="" size="23" />
                    <label class="grey" for="email">Email:</label>
                    <input class="field" type="text" name="email" id="email" size="23" />
                    <label>A password will be e-mailed to you.</label>
                    <input type="submit" name="submit" value="Register" class="bt_register" />
                </form>
            </div>
       
            <?php
       
            else:
       
            ?>
       
            <div class="left">
       
            <h1>Members panel</h1>
       
            <p>You can put member-only data here</p>
            <a href="registered.php">View a special member page</a>
            <p>- or -</p>
            <a href="?logoff">Log off</a>
       
            </div>
       
            <div class="left right">
            </div>
       
            <?php
            endif;
            ?>
        </div>
    </div> <!-- /login -->
 
    <!-- The tab on top -->
    <div class="tab">
        <ul class="login">
            <li class="left">&nbsp;</li>
            <li>Hello <?php echo $_SESSION['usr'] ? $_SESSION['usr'] : 'Guest';?>!</li>
            <li class="sep">|</li>
            <li id="toggle">
                <a id="open" class="open" href="#"><?php echo $_SESSION['id']?'Open Panel':'Log In | Register';?></a>
                <a id="close" style="display: none;" class="close" href="#">Close Panel</a>       
            </li>
            <li class="right">&nbsp;</li>
        </ul>
    </div> <!-- / top -->
 
</div> <!--panel -->
Mine:
PHP:
<?php
 
define('INCLUDE_CHECK',true);
 
require 'connect.php';
require 'functions.php';
// Those two files can be included only if INCLUDE_CHECK is defined
 
 
session_name('tzLogin');
// Starting the session
 
session_set_cookie_params(2*7*24*60*60);
// Making the cookie live for 2 weeks
 
session_start();
 
if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe'])
{
// If you are logged in, but you don't have the tzRemember cookie (browser restart)
// and you have not checked the rememberMe checkbox:
 
$_SESSION = array();
session_destroy();
 
// Destroy the session
}
 
 
if(isset($_GET['logoff']))
{
$_SESSION = array();
session_destroy();
 
header("Location: index.php");
exit;
}
 
if($_POST['submit']=='Login')
{
// Checking whether the Login form has been submitted
 
$err = array();
// Will hold our errors
 
 
if(!$_POST['usr'] || !$_POST['pass'])
$err[] = 'All the fields must be filled in!';
 
if(!count($err))
{
$_POST['usr'] = mysql_real_escape_string($_POST['usr']);
$_POST['pass'] = mysql_real_escape_string($_POST['pass']);
$_POST['rememberMe'] = (int)$_POST['rememberMe'];
 
// Escaping all input data
 
$row = mysql_fetch_assoc(mysql_query("SELECT id,usr FROM tz_members WHERE usr='{$_POST['usr']}' AND pass='".md5($_POST['pass'])."'"));
 
if($row['usr'])
{
// If everything is OK login
 
$_SESSION['usr']=$row['usr'];
$_SESSION['id'] = $row['id'];
$_SESSION['rememberMe'] = $_POST['rememberMe'];
 
// Store some data in the session
 
setcookie('tzRemember',$_POST['rememberMe']);
}
else $err[]='Wrong Username and/or pass!';
}
 
if($err)
$_SESSION['msg']['login-err'] = implode('<br />',$err);
// Save the error messages in the session
 
header("Location: index.php");
exit;
}
else if($_POST['submit']=='Register')
{
// If the Register form has been submitted
 
$err = array();
 
if(strlen($_POST['usr'])<4 || strlen($_POST['usr'])>32)
{
$err[]='Your username must be between 3 and 32 characters!';
}
 
if(preg_match('/[^a-z0-9\-\_\.]+/i',$_POST['usr']))
{
$err[]='Your username contains invalid characters!';
}
 
if(!checkEmail($_POST['email']))
{
$err[]='Your email is not valid!';
}
 
if(!count($err))
{
// If there are no errors
 
$pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
// Generate a random pass
 
$_POST['email'] = mysql_real_escape_string($_POST['email']);
$_POST['usr'] = mysql_real_escape_string($_POST['usr']);
// Escape the input data
 
 
mysql_query("INSERT INTO tz_members(usr,pass,email,regIP,dt)
VALUES(
 
'".$_POST['usr']."',
'".md5($pass)."',
'".$_POST['email']."',
'".$_SERVER['REMOTE_ADDR']."',
NOW()
 
)");
 
if(mysql_affected_rows($link)==1)
{
send_mail('',
$_POST['email'],
'Registration System Demo - Your New Password',
'Your pass is: '.$pass);
 
$_SESSION['msg']['reg-success']='We sent you an email with your new pass!';
}
else $err[]='This username is already taken!';
}
 
if(count($err))
{
$_SESSION['msg']['reg-err'] = implode('<br />',$err);
}
 
header("Location: index.php");
exit;
}
 
$script = '';
 
if($_SESSION['msg'])
{
// The script below shows the sliding panel on page load
 
$script = '
<script type="text/javascript">
 
$(function(){
 
$("div#panel").show();
$("#toggle a").toggle();
});
 
</script>';
 
}
?>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PixableCMS - Demo Blogging System</title>
 
    <link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" />
 
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
 
    <!-- PNG FIX for IE6 -->
    <!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
    <!--[if lte IE 6]>
        <script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
    <![endif]-->
 
    <script src="login_panel/js/slide.js" type="text/javascript"></script>
 
    <?php echo $script; ?>
</head>
 
<body>
 
<!-- Panel -->
<div id="toppanel">
<div id="panel">
<div class="content clearfix">
<div class="left">
<h1>PixableCMS</h1>
<h2>A Blogging CMS Solution</h2>
<p class="grey">You are free to use this CMS on your sites!</p>
<h2>A Big Thanks</h2>
<p class="grey">Sheldos for Theme<br/>and<br/>EthanRaadley for Code.</p>
</div>
         
         
            <?php
 
if(!$_SESSION['id']):
 
?>
         
<div class="left">
<!-- Login Form -->
<form class="clearfix" action="" method="post">
<h1>Member Login</h1>
                 
                    <?php
 
if($_SESSION['msg']['login-err'])
{
echo '<div class="err">'.$_SESSION['msg']['login-err'].'</div>';
unset($_SESSION['msg']['login-err']);
}
?>
 
<label class="grey" for="usr">Username:</label>
<input class="field" type="text" name="usr" id="usr" value="" size="23" />
<label class="grey" for="pass">Password:</label>
<input class="field" type="password" name="pass" id="pass" size="23" />
          <label><input name="rememberMe" id="rememberMe" type="checkbox" checked="checked" value="1" /> &nbsp;Remember me</label>
      <div class="clear"></div>
<input type="submit" name="submit" value="Login" class="bt_login" />
</form>
</div>
<div class="left right">
<!-- Register Form -->
<form action="" method="post">
<h1>Not a member yet? Sign Up!</h1>
                 
                    <?php
 
if($_SESSION['msg']['reg-err'])
{
echo '<div class="err">'.$_SESSION['msg']['reg-err'].'</div>';
unset($_SESSION['msg']['reg-err']);
}
 
if($_SESSION['msg']['reg-success'])
{
echo '<div class="success">'.$_SESSION['msg']['reg-success'].'</div>';
unset($_SESSION['msg']['reg-success']);
}
?>
               
<label class="grey" for="usr">Username:</label>
<input class="field" type="text" name="usr" id="usr" value="" size="23" />
<label class="grey" for="email">Email:</label>
<input class="field" type="text" name="email" id="email" size="23" />
<label>A pass will be e-mailed to you with your password.</label>
<input type="submit" name="submit" value="Register" class="bt_register" />
</form>
</div>
         
            <?php
 
else:
 
?>
         
            <div class="left">
         
         
            <meta http-equiv="REFRESH" content="0;url=account.php">
         
            </div>
         
            <div class="left right">
            </div>
         
            <?php
endif;
?>
</div>
</div> <!-- /login -->
 
    <!-- The tab on top -->
<div class="tab">
<ul class="login">
  <li class="left">&nbsp;</li>
      <li>Hello <?php echo $_SESSION['usr'] ? $_SESSION['usr']: 'Guest';?>!</li>
<li class="sep">|</li>
<li id="toggle">
<a id="open" class="open" href="#"><?php echo $_SESSION['id']?'Open Panel':'Log In | Register';?></a>
<a id="close" style="display: none;" class="close" href="#">Close Panel</a>
</li>
  <li class="right">&nbsp;</li>
</ul>
</div> <!-- / top -->
 
</div> <!--panel -->
See a difference?

Not really, you have done nothing that is worth not crediting. - Changing the post variables isn't worth taking the credit..
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
so you changes the id's from usr to username

You made some changes that do not affect anything, not a fix
 

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
Not much has been 'fixed' compare both of them, and you still get similar results, even same database structure;



You have basically taken all of that page, lmfao.



Not really, you have done nothing that is worth not crediting.
Eh, it works atleast,
& im currently coding a control panel

And the db structure will be SO different.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,194
3,901
Eh, it works atleast,
& im currently coding a control panel

And the db structure will be SO different.

Alright, well I'll be sure to still search when you show more code. :) - Good luck. 
Eh, it works atleast,
& im currently coding a control panel

And the db structure will be SO different.

Alright, well I'll be sure to still search when you show more code. :) - Good luck.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Please post some screenshots or I will close the thread.
 

Khalil

IDK
Dec 6, 2011
1,642
786
Well, you haven't done anything much, you just got my template and the code for js slide from other sites and put them all together, and so i doubt you can make a cp, i jut know your going to get it somewhere else and put credits all to your self, but just as craig said, we shall be searching as you update.
 

Reecey

Member
Mar 6, 2012
57
12
Either way I love this release, I'm probably going to continue it on myself for my personal site - leaving credits obv. Nice work!
 

EthaanRaadley

EthaanRaadley.NET
Oct 1, 2012
140
9
Update:
I will still develop but on my new account, sorry!

I'm so sorry i haven't had time for pixable cms,
i will get back with it,
I'm just too busy with school :3
 

bulletproof

Member
Jan 26, 2012
145
14
Eh, it works atleast,
& im currently coding a control panel

And the db structure will be SO different.
Atleast it works? thats all your gonna say about ripping and not crediting? im gonna go rip microsoft's site and say "Atleast it works" when they send a DMCA to me :)
 
Status
Not open for further replies.

Users who are viewing this thread

Top