Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('<$MTCGIServerPath$>/php/mt.php');
- $mt = new MT(<$MTBlogID$>, '<$MTConfigFile$>');
- $db =& $mt->db;
- $config = $db->fetch_plugin_config('MT Protect');
- if($_REQUEST['rand'] == $config['rand']) {
- setcookie($_REQUEST['obj_type'].$_REQUEST['id'], 1, time()+60*60*24, '/');
- }
- $config['rand'] = md5(time().mt_rand());
- require_once("<$MTCGIServerPath$>/php/lib/MTSerialize.php");
- $serializer = new MTSerialize();
- $data = $serializer->serialize($config);
- $put_config_back = $db->get_results("update mt_plugindata set plugindata_data = '$data' where plugindata_plugin = 'MT Protect' and plugindata_key = 'configuration'", ARRAY_A);
- header('Location: '. $_REQUEST['redirect']);
- ?>
Add Comment
Please, Sign In to add comment