Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN 6710 - Section A – TR 9:30-10:45 CRN 10570 – Section B – TR 5:30-6:45.

Slides:



Advertisements
Similar presentations
Access 2007 ® Use Databases How can Microsoft Access 2007 help you to get and stay organized?
Advertisements

1.  Understanding about How to Working with Server Side Scripting using PHP Framework (CodeIgniter) 2.
Student Getting Started Guide Updated June Ensure that you are connected to the Internet. 2. Launch your web browser (Internet Explorer, Firefox,
Unauthorized Reproduction Prohibited SkyPoint Alarm Integration Add-On Using OnGuard Alarms to create events in SkyPoint Also called ‘SkyPoint V0’ CR4400.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
Tutorial 6 Working with Web Forms
1 CSI 101 Elements of Computing Fall 2009 Lecture #4 Using Flowcharts Monday February 2nd, 2009.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Pet Fish and High Cholesterol in the WHI OS: An Analysis Example Joe Larson 5 / 6 / 09.
Creating Web Page Forms
Working with SharePoint Document Libraries. What are document libraries? Document libraries are collections of files that you can share with team members.
Web-based Document Management System By Group 3 Xinyi Dong Matthew Downs Joshua Ferguson Sriram Gopinath Sayan Kole.
Login Screen This is the Sign In page for the Dashboard Enter Id and Password to sign In New User Registration.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Chapter 7 Working with Files.
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
CodeIgniter - [Overview]
Login Screen This is the Sign In page for the Dashboard New User Registration Enter Id and Password to sign In.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
D2L Notes Be sure to submit your link in the dropbox provided on D2L You can just upload an empty text file if a file upload is required Do not use D2L.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
1. Chapter 25 Protecting and Preparing Documents.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Cookies and Sessions IDIA 618 Fall 2014 Bridget M. Blodgett.
Web Center Training ©2003 Optimum Technology, Inc.
Controlling Web Site Access Using Logins CS 320. Basic Approach HTML form a php page that collects the username and password  Sends them to second PHP.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
CD Web XMS Training How to use the Xeno Media web site content management system.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
PHP Error Handling & Reporting. Error Handling Never allow a default error message or error number returned by the mysql_error() and mysql_errno() functions.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
 Shopping Basket  Stages to maintain shopping basket in framework  Viewing Shopping Basket.
Database Access Control IST2101. Why Implementing User Authentication? Remove a lot of redundancies in duplicate inputs of database information – Your.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Internet Advancement Ore-Ida Council Boy Scouts of America.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
| imodules.com Top 10 FAQ in Application Support Kelly Schmiedeler & Amber Quayle.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Let's build a VMM service template from A to Z in one hour Damien Caro Technical Evangelist Microsoft Central & Eastern Europe
DATABASE ACCESS CONTROL IST Question Almost every PHP page needs to interact with database, does that mean sqlUsername and sqlPassword need to be.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED ADMINISTRATION.
Building Web Applications
Mr. Justin “JET” Turner CSCI 3000 – Fall 2016 Section DA MW 4:05-5:20
Security - Forms Authentication
Presentation transcript:

Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45

CI - Helpers Helper files are used to provide access to a few stand- alone functions The functions could be used to help with any components of the MVC structure Note: These functions are not tied into the parent object, so the $this variable is not defined If we need access to the CI object, we get it using: $CI =& get_instance(); =& is the PHP pass-by-reference, so instead of copying the object, we are pointing at the same object

CI - Helpers We can define multiple functions in the same helper file, but we should only do this if they are strongly related We need to create the helper file at: /application/helpers/filename_helper.php Then we can load the helper using: $this->load->helper(“filename”); Finally, we can all the helper functions directly function_name();

CI - Helpers if ( ! defined('BASEPATH')) exit('No direct script access allowed'); if ( ! function_exists(‘function_name')) { function function_name() { $CI =& get_instance(); }

CI - Libraries Building a custom library can be done entirely from scratch, or extending from a CI library for added functionality For CI to properly load the library, it is important the class name and file name match

CI - Libraries Library file location: /application/libraries/My_library.php Load the library: $this->load->library(“My_library”); Finally, accessing the library: $this->My_library->libraryFunction(); Our constructor will also assign the CI object reference to some instance data to better enforce our OOP

CI - Libraries if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class myLibrary { public function __construct() { $this->ci =& get_instance(); }

CI - Libraries If you want to extend a CI library, or fully replace a default one, then you just need to have it in the libraries folder, named exactly the same .php class CI_ {} Many of the CI libraries are prefixed with CI_ The load/autoload functions will check for a local library before moving to the framework/system for library

CI - Sessions Session data is a way for your web application to maintain data with a given user You can store variables in the session, and use those values on every page visited by a specific user afterwards Maintaining authentication is almost always at least partially done through storing session data We might load some profile data from a database into a session for easier access on future pages, such as which theme to use in the application

CI - Sessions CI has a full session library writing data into session variables and getting it back out $this->session->set_userdata(“name”, “value”); //can also take an associative array $this->session->userdata(“name”); $this->session->has_userdata(“name”); $this->session->unset_userdata(“name”);

CI - Sessions CI also has a concept called “flash data” which is session data that is not kept after the very next page load This can be useful for error messages you want to display on the next page, but don’t need after that $this->session->set_flashdata(“name”, “value”); $this->session->flashdata(“name”); $this->session->keep_flashdata(“name”);

CI – Encryption/Hashing There are two terms we need to define: Hashing A one-way process of converting data from an arbitrary size into data of a fixed size Encryption / Decryption A two-way process converting data into an unrecognizable form and then back into the original form When working with passwords, we want to perform a hash function When they try to log in, we hash the password entered and compare the two hash values

CI – Encryption/Hashing Encryption can be used for data we want to protect, but need to be able to get the original formatted data back at some point CI used to provide a method for hashing, but with changes to recent versions of PHP, the built in hash() function suites that need without a custom function We can use hash_algos() to get a list of available hashing algorithms

CI - Encryption The CI library has extensive information on available encryption methods One item you need is a key, which is often produced using a hash method You could use something about your logged in user, such as their username, to create the key, then their data is better tied to their account

Project 2 - CodeIgniter Create a CodeIgniter application that uses the following: Create a form to collect data from the user Use the Form Helper, Form Validation Library, File Upload Library, and Image Manipulation Library Manipulate the uploaded image by resizing it Use the Output library to help you render the image using CI (not a direct link to the image) Something like: application/files/image/2 would render the image from the row with ID = 2

Project 2 - CodeIgniter This project should be on a separate sub-domain project2.yourdomain.com For 10% bonus (2pts) Set up a log in page, and use the Session Library to help you ensure that no page loads unless the user is logged in Provide a Username/Password in the dropbox comments

Reminders Project 1 – Responsive Site – Due Oct 8 th The Midterm project will be an in-class assignment

Next Time Instructions for configuring Sessions in GoDaddy A quick review of what you can expect the mid term to be like Time to work on Project 1 and 2, and ask questions if you are running into any issues