Tuesday, July 30, 2013

Php Framework EssenceOne

Worlds Fastest and Simplest Php Framework !

Want In On A Secret ?

How about trying a dynamic take on probably the easiest Php Framework there is. And how about the most Dynamic ?  EssenceOne not only breaks down every File, Folder, Template, Model, View and Controller Alphanumerically but also stages and stacks them into easily managed class routers for Team Production and or Newbie  Builds. Now do away with the bulky nonsense that Zend and Cake and Codeigniter all wish to incorporate into every Technical School and Training Course on the Market simply to make money. 

Now how about adding Twitter-Boostrap Templating and Mobile to all of that ? That's Right ! Complete with Pop-ups, Carousels, Tool-tips, Modals, Pagination, Scrollers, Tabs, Forms, Buttons, Labels, Thumbnails, Drop-downs, Drop-ups, Layouts and all the Java you may ever need. 

Now what else can it do ? How about Session Members already installed ? And --->>>

It Is Free

Dowload Here !

To Learn More About EssenceOne And How It Works Visit Their Blog !

EssenceOne Blogger !



Sunday, June 16, 2013

Class Construct Method

Using The Class Construct Method In Php

//The difference between normal class methods and construct class methods//

class exampleOne
{
function sayHello()
{
echo 'Hello !';
}//end function
}//end class
//now to execute our class
$ourexample = new exampleOne;
$ourexample->sayHello();

class exampleTwo
{
public function __construct()
{
$this->sayHowdy();
}//end function construct

public function sayHowdy()
{
echo 'Howdy !';
}//end function
}//end class
// now we can call and execute the class using only one line below//
$example = new exampleTwo;

Sunday, April 7, 2013

Php Convert String Specific Words To Links In Paragraphs.

Php Convert String Specific Words Within Paragraphs Into Links. This little jewel allows you to do some sneaky self made tags within your blog or forum. Can be used before input or even better on coming out of the database query. The thing to remeber is that arrays are mirrored within preg_replace and require the $replacements variables to be in numeric reverse order. If you add another to the list it will be $items[3] and the new $replacements var will become [0] which moves the replacements up one numeric order. This would place shoes replacement at [3] shirts at [2] and jeans at[1] then new item var at [0].

?php
$string = 'She has shirts in blue her jeans in black and her shoes are all faded.';
$items = array();
$items[0] = '/shoes/'; //List of items you want changed//
$items[1] = '/shirts/';
$items[2] = '/jeans/';
$replacements = array();
$replacements[2] = 'a href="http://www.example.com/foot/shoes.php">Shoes /a>';
$replacements[1] = 'a href="index.php?items=shirts">Shirts /a>';
$replacements[0] = 'a href="index.php?items=jeans">Jeans /a>';
$output = preg_replace($items, $replacements, $string);
echo $output;// OR QUERY BACK INTO DATABASE//
?

Outputs: The paragraph and links on the selected items.

Sunday, February 24, 2013

Using Php To Switch Css Styles Function

Use Php To Switch Css Styles Function()


My Template Engine----> This is a secret ! Not very many programers know of this. This can switch css style sheets using php by calling this function verses another one,,in which many think impossible.
?php start tag here

function cssTemp()
{
?> php end tag here
#header_grad {
 background-image: url(/images/networks/header_grad.png);
 background-position: 0 0;
 background-repeat: no-repeat;
 float: left;
 width: 100%;
 min-height: 130px;
}

#header h1 {
 margin: 45px 28px 0 28px;
}

#header h2 {
 margin: 0 28px 0 28px;
 padding: 2px 0 26px 0;
}

#content_wrapper h3.pagetitle {
 font-size: 22px;
 font-weight: normal;
 padding-top: 10px;
 margin-bottom: 23px;
 font-family: "Trebuchet MS";
}

#header .logo {
 margin: 45px 0 45px 28px;
}
?php start tag here

} //end function cssTemp()
?> php end tag here

Then simply call the function at the top of a page between the script tags.
Add as many as you want using php if conditions= ??? if condition=true { echo csstemp1() } else { echo cssTemp2() } click a button to change templates.

Thursday, February 21, 2013

Php MVC Framework EssenceOne !

Php MVC Framework EssenceOne !

Simple

EssenceOne uses one Model index.php page to handle everything you can throw at it. Simply add new views and controllers functions and classes and include them within the indexer. Then simply route every link through the index.php file indexer. Thats it. Views take in their required functions and classes by simply including them within each view by echo. Comes with Bootstrap and sessions support for users. 

Can be Downloaded here----essenceone-php-framework/downloads/list

Requires Wamp/Xamp/Lamp/Vertrigo or Online Server using Php+ and Mysql.

Wednesday, February 20, 2013

User Roles Function

User Roles Php Function !

USER ROLES FUNCTIONS

function errorRep()
 {
  $error='Un Authorised !';
  echo $error;
 } //end function errorRep()

function userRole() //PLACE ($uid) for production //testing value only
 {
 //PLACE QUERY HERE-$result=mysql_query("SELECT id, role FROM users where id=.$uid.");
  $role=2; //data result
  $id=2;   // test only data result  //use htacces with this script.
 
if ($role == 1) {
    echo 'Is User
';
    echo 'Dashboard';
}
if ($role == 2) {
    echo 'Is Editor
';
    echo 'Dashboard';
    }
   
if ($role == 3) {
    echo 'Is Publisher
';
    echo 'Dashboard';
    }   
   
if ($role == 4 and $id==1) {    //advised to add global $admin here
    echo 'Is Admin
';
    echo 'Admin Panel';
    }   
   
if ($role == '') {
    echo errorRep();
    }       

} // end function userRole()

echo userRole();  //for production use echo userRole($uid);

Md5 Plus Endless Salt !

Md5 Plus Added Salts !

What would you give to have salts to add to md5 or sha1 and making them any length and still retrieve them for password validation?

Enter code here...THE MD5 HASH ONLY GOES UP TO 32 CHARS,,,,FOR SECURITY WHY NOT ADD MORE? Or better yet add all you want, because This script only retrieves the original Md5 hash. !!!

SALT
function saltIt()
{
$password
='razorback';
$addsalt
='a5jcmnb62sdx';
$pass
=(md5($password));
$salt
=$pass.$addsalt;
echo $salt
;
} //end function saltIt()
echo saltIt
();                 // password hash by robin deatherage
// our md5+added salt = a618b59e86b0042f6eb0341d25aedcc1a5jcmnb62sdx

UNSALT
function unSalt()
{
$mystring1
='a618b59e86b0042f6eb0341d25aedcc1a5jcmnb62sdx';//our md5+salt
$Remove_Our_Added_Salt
='a5jcmnb62sdx';

$nosalt
=(mb_substr($mystring1, 0,32));//THE-SALT-CAN-BE-ANY-LENGTH-THIS RETRIEVES ONLY THE MD5.
echo $nosalt
;
//outputs the original md5 without the added salt a618b59e86b0042f6eb0341d25aedcc1
} //end function unSalt()
echo unSalt
();