Posts Tagged: cakephp
-
Nov 23, 2010
Comments Offphp realex payment gateway code
$timestamp = strftime(“%Y%m%d%H%M%S”); $topay = ’5′; $merchantid = “mytalentplace”;//here grant crow`s realex merchent id should come $secret = “wXcHmZ9yec”; $orderid= $timestamp.’-’.$_SESSION['ord_id']; $amount =$_POST['amt']*100; if($_REQUEST['currency']==”doller”){ $curr= “USD”; } elseif($_REQUEST['currency']==”euro”){ $curr= “EUR”; }else { $curr= “GBP”; } $tmp = “$timestamp.$merchantid.$orderid.$amount.$curr”; //$tmp = “$timestamp.$merchantid.$orderid”; $md5hash = sha1($tmp); $tmp = “$md5hash.$secret”; $md5hash = sha1($tmp); $up=”UPDATE `mtp_user_payment` SET order_id=’”.$lid.”‘ where...
-
Nov 23, 2010
Comments OffHow To Validate data Without Saving? in Cakephp
You know, CakePHP check data only when you saving: $this -> User -> save ($this->data) But if you do not needing to save data? In this case, you can use this “hint”: if ( $this -> User -> validates ( $this -> data ) ) { // OK, good to go } else { $this->set(...
-
Nov 23, 2010
Comments OffHow To Integrate WYSIWYG Editor into CakePHP?
Interesting code, feature, hints, tips for programming in cakephp style // // How To Integrate WYSIWYG Editor into CakePHP? // // Easy way to integrate Xihna into CakePHP. Easy way to integrate TinyMCE into CakePHP. And, of couse, it’s SO EASY to integrate FCKEditor into CakePHP But if you asked me about WYSIWYG Editor, I...
-
Nov 23, 2010
Comments Off21 Things You Must Know About CakePHP
Easily creating static pages I needed to create several pages that didn’t use any models and contained static data inside the default layout. My first thought was to create a controller for these pages and define an action for each static page I needed. However, this solution seemed tedious and would make it difficult to...
-
May 21, 2010
Comments OffCustom 404 error page with CakePHP
1. Create your error layout in app/view/layouts/ (with name error.ctp) 2. Create your 404 error view in app/view/errors/ (with name error404.ctp) In /cake/libs/view/errors you will find all the default error views. You can copy and paste error404.ctp in your app/view/errors directory or create a new file and customize this view as you like. 3. Set...
-
May 21, 2010
Comments OffA solution for e-mail handling in CakePHP
The emailComponent (cake\libs\controller\components\email.php) is a way for you to using the same concepts of layouts and view ctp files to send formated messages as text, html or both. It supports sending via the built in mail functions of PHP, via smtp server or a debug mode where it writes the message out to a session...
-
May 20, 2010
Comments OffA easy captcha component implentation into cakephp.
First save the code below into a file called captcha.php and put it in your controller components folder Then very important create a folder called “fonts” in your files which is located in webroot/files/ copy the fonts you want to use inside that folder you can add as many fonts as you like and use...
-
Mar 03, 2010
Comments OffCodeIgniter : A recommendation for PHP Programmer
I was thinking to publish this post way before but between my irregularity and busy schedule I...