Jump to content
Killersites Forums

Search the Community

Showing results for tags 'colorbox'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Job Boards
    • Jobs
  • Community Lounge and FAQ
    • Forum News
    • Open Forum
    • New Members Forum - Start Here!
  • Entrepreneurship, Business and Marketing
    • Social Media Marketing & Web Marketing
    • Entrepreneurship
    • Career Questions - Asked and Answered
  • StudioWeb
    • StudioWeb
    • StudioWeb News
    • StudioWeb Projects
  • Programming
    • Python
    • Javascript
    • PHP
  • Web Design
    • Beginners Web Design
    • HTML/XHTML
    • Dreamweaver
    • CSS
    • Advanced Web Design
    • Business of Web Design
    • Web Design News
  • Miscellaneous
    • Cybersecurity
    • Miscellaneous Software
    • Blogs and CMS
    • Web Accessibility
    • Peer-to-Peer Reviews
    • Website Templates
    • Web Design Jobs
    • Test Forum
  • Archives
    • Beginners Web Design
    • Course: The Complete Entrepreneur
    • Web Accessibility
    • Photoshop
    • CSS
    • Forum Rules and Etiquette
    • Flash
    • ASP
    • General Programming
    • Expression Web
    • Beginners Ruby
    • Killersites University
    • Actionscript

Categories

There are no results to display.

There are no results to display.

Product Groups

  • Business & Entrepreneur Courses

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


LinkedIn


Facebook


Twitter


AIM


Yahoo


Other


Location


Interests

Found 2 results

  1. I have a problem. I have followed the video course and the full code adopted. I still do not have a login box and the colorbox does not seem to work. i also get a syntax error with noconflict below my code: <Link href = "<php ​​echo APP_RESOURCES;?> Css / fp_style.css" media = "screen" rel = "stylesheet" type = "text / css" /> <script type="text/javascript" src="http://code.jquery.c...n.js"> </ script> <script type="text/javascript"> $ noConflict (). </ script> <Script type = "text / javascript" src = "<php ​​echo APP_RESOURCES;?> Javascript / colorbox / colorbox.js"> </ script> <Link href = "<php ​​echo APP_RESOURCES;?> Javascript / colorbox / colorbox.css" media = "screen" rel = "stylesheet" type = "text / css" /> </ Script> Does anyone know what the problem could be?
  2. I have a problem. I have followed the video course and the full code adopted. (i'm not finished yet with the course) I still do not have a login box and the colorbox does not seem to work. i also get a syntax error with noconflict below my code: t_login.php <Link href = "<php ​​echo APP_RESOURCES;?> Css / fp_style.css" media = "screen" rel = "stylesheet" type = "text / css" /> <script type="text/javascript" src="http://code.jquery.c...n.js"> </ script> <script type="text/javascript"> $ noConflict (). </ script> <Script type = "text / javascript" src = "<php ​​echo APP_RESOURCES;?> Javascript / colorbox / colorbox.js"> </ script> <Link href = "<php ​​echo APP_RESOURCES;?> Javascript / colorbox / colorbox.css" media = "screen" rel = "stylesheet" type = "text / css" /> </ Script> Login.php <?php include("init.php"); if (isset($_POST['submit'])) { // get data $FP->Template->setData('input_user', $_POST['username']); $FP->Template->setData('input_pass', $_POST['password']); // validate data if ($_POST['username'] == '' || $_POST['password'] == '') { // show error if ($_POST['username'] == '') { $FP->Template->setData('error_user', 'required field!'); } if ($_POST['password'] == '') { $FP->Template->setData('error_pass', 'required field!'); } $FP->Template->setAlert('Please fill in all required fields', 'error'); $FP->Template->load(APP_PATH . "core/views/v_login.php"); } else if ($FP->Auth->validateLogin($FP->Template->getData('input_user'), $FP->Template->getData('input_pass')) == FALSE) { // invalid login $FP->Template->setAlert('Invalid username or password!', 'error'); $FP->Template->load(APP_PATH . "views/v_login.php"); } else { // successful log in $_SESSION['username'] = $FP->Template->getData('input_user'); $_SESSION['loggedin'] = TRUE; $FP->Template->load(APP_PATH . "core/views/v_loggingin.php"); } } else { $FP->Template->load(APP_PATH . "core/views/v_login.php"); } init.php: <?php /* INIT Basic configuration settings */ // create application settings define("SITE_PATH","http://localhost/PassieCMS/"); //<- aanpassen define ("APP_PATH", str_replace("\\","/",dirname(__FILE__)) . "/"); define("SITE_RESOURCES", "http://localhost/PassieCMS/resources/"); define("APP_RESOURCES", "http://localhost/PassieCMS/app/resources/"); define("SITE_CSS", "http://localhost/PassieCMS/resources/css/style.css"); //<-aanpassen indien andere template // database settings $server = 'localhost'; // database server/host $user = 'root'; //gebruikersnaam database $pass = 'root'; // wachtwoord database $db = 'fp_cms'; // selecteert database // error reporting mysqli_report(MYSQLI_REPORT_ERROR); // create FlightPath core object require_once(APP_PATH . "core/core.php"); $FP = new FlightPath_Core($server, $user, $pass, $db); Core.php <?php /* core FlightPath class Creates the central FlightPath object, as well as core functionality */ class FlightPath_Core { public $Template, $Auth, $Database; function __construct($server, $user, $pass, $db) { //create database connection $this->Database = new mysqli($server, $user, $pass, $db); // create template object include(APP_PATH . "core/models/m_template.php"); $this->Template = new Template(); $this->Template->setAlertTypes(array('success', 'warning', 'error')); // create auth object include(APP_PATH . "core/models/m_auth.php"); $this->Auth = new Auth(); // start session session_start(); } function __destruct() { $this->Database->close(); } function head() { if ($this->Auth->checkLoginStatus()) { include(APP_PATH . "core/templates/t_head.php"); } if (isset($_GET['login']) && $this->Auth->checkLoginStatus() == FALSE) { include(APP_PATH . "core/templates/t_login.php"); } } function body_class() { if ($this->Auth->checkLoginStatus()) { echo " fp_editing"; } } function toolbar() { if ($this->Auth->checkLoginStatus()) { include(APP_PATH . "core/templates/t_toolbar.php"); } } function login_link() { if ($this->Auth->checkLoginStatus()) { echo "<a href='" . SITE_PATH . "app/logout.php'>Logout</a>"; } else { echo "<a href='?login'>Login</a>"; } } } index.php <?php include ("app/init.php");?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>PassieCMS</title> <link href="resources/css/style.css" rel="stylesheet" type="text/css"> <?php $FP->head();?> </head> <body class="home <?php $FP->body_class();?>"> <?php $FP->toolbar();?> <div id="wrapper"> <h1>Website</h1> <div id="banner"> <img src="resources/images/banner.jpg" alt="banner" width="900" height="140"> </div> <ul id="nav"> <li><a href="#">Home</a></li> <li><a href="#">Test link</a></li> <li><a href="#">Longer Text Link</a></li> <li><a href="#">Contact us</a></li> </ul> <div id="content"> <div class="left"> <h2>Header info...</h2> <p>Text here...</p> </div> <div class="right"> <p>Text here...</p> <p>Text here...</p> </div> </div> <div id="footer"> Copyright 2014 PassieCMS | <?php $FP->login_link();?> </div> </div> </body> </html> M_auth: <?php /* Authorization Class Deal with auth tasks */ class Auth { private $salt = '2pkhout'; /* Constructor */ function __construct() { } /* Functions */ function validateLogin($user, $pass) { // access db global $Database; // create query if ($stmt = $Database->prepare("SELECT * FROM users WHERE username = ? AND password = ?")) { $stmt->bind_param("ss", $user, md5($pass . $this->salt)); $stmt->execute(); $stmt->store_result(); // check for num rows if ($stmt->num_rows > 0) { // success $stmt->close(); return TRUE; } else { // failure $stmt->close(); return FALSE; } } else { die("ERROR: Could not prepare MySQLi statement."); } } function checkLoginStatus() { if (isset($_SESSION['loggedin'])) { return TRUE; } else { return FALSE; } } function logout() { session_destroy(); session_start(); } } v_login <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Log In</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="views/style.css" media="screen" rel="stylesheet" type="text/css"> </head> <body> <h1>Log In</h1> <div id="content"> <form action="" method="post"> <div> <?php $alerts = $this->getAlerts(); if ($alerts != '') { echo '<ul class="alerts">' . $alerts . '</ul>'; } ?> <div class="row"> <label for="username">Username: *</label> <input type="text" name="username" value="<?php echo $this->getData('input_user'); ?>"> <div class="error"><?php echo $this->getData('error_user'); ?></div> </div> <div class="row"> <label for="password">Password: *</label> <input type="password" name="password" value="<?php echo $this->getData('input_pass'); ?>"> <div class="error"><?php echo $this->getData('error_pass'); ?></div> </div> <div class="row"> <p class="required">* required</p> <input type="submit" name="submit" class="submit" value="Submit"> </div> </div> </form> </div> </body> </html> And also when i try to login i get the following error: Fatal error: Call to a member function prepare() on a non-object in C:\xampp\htdocs\PassieCMS\app\core\models\m_auth.php on line 28 Does anyone know what the problem could be?
×
×
  • Create New...