Advertisement
Guest User

Untitled

a guest
Aug 8th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class NgrabnewsHelper {
  15. public function autoValidLic() {
  16. $db = &JFactory::getdbo( );
  17.  
  18. $license = new stdClass( );
  19. $query = 'SELECT *' . ' FROM #__ngrab_lic' . ' WHERE id = 1';
  20. $db->setQuery( $query );
  21. $ret = $db->loadObject( );
  22.  
  23. if ($ret) {
  24. $lic_data = pack( 'H' . strlen( $ret->license ), $ret->license );
  25. $nng = new NNewsGrabber( $ret->serial_number, $ret->license_key, $lic_data );
  26. $lic_status = $nng->get_lic_status( );
  27.  
  28. if ($lic_status) {
  29. if ($lic_status == 2) {
  30. $license->id = $ret->id;
  31. $license->license = bin2hex( $nng->get_lic_data( ) );
  32. $db->updateObject( '#__ngrab_lic', $license, 'id' );
  33. }
  34.  
  35. return true;
  36. }
  37.  
  38. return false;
  39. }
  40.  
  41. }
  42.  
  43. public function loadLimitLic() {
  44. $db = &JFactory::getdbo( );
  45.  
  46. $licinfo = array( );
  47. $query = 'SELECT *' . ' FROM #__ngrab_lic' . ' WHERE id = 1';
  48. $db->setQuery( $query );
  49. $ret = $db->loadObject( );
  50.  
  51. if ($ret) {
  52. $lic_data = pack( 'H' . strlen( $ret->license ), $ret->license );
  53. $nng = new NNewsGrabber( $ret->serial_number, $ret->license_key, $lic_data );
  54. $licinfo['limitfilter'] = $nng->get_limit_filter( );
  55. $licinfo['limitautorun'] = $nng->get_limit_autorun( );
  56. $licinfo['isshowad'] = $nng->get_is_showad( );
  57. $licinfo['lictoname'] = $nng->get_lic_toname( );
  58. }
  59.  
  60. return $licinfo;
  61. }
  62. ..................................................................................
  63. .......................................
  64. ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement