Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Url Management -Edit Id Encrytion In Cgridview

$
0
0
In framework file : CButtonColumn.php
1. change the updateButtonUrl variable,
public $updateButtonUrl='Yii::app()->controller->createUrl("update",array("id"=>base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5("testKey"), $data->primaryKey, MCRYPT_MODE_CBC, md5(md5("testKey"))))))';

2. Use the public function actionUpdate($id)
{

$id =rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5("testKey"), base64_decode($id), MCRYPT_MODE_CBC, md5(md5("testKey"))), "\0");
echo $id;exit;

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>