Guest User

Untitled

a guest
Feb 2nd, 2022
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. <?php
  2.  
  3. $domain=$_SERVER['SERVER_NAME'];
  4. $product="40";
  5. $licenseServer = "http://harryleverman.com/license/api/";
  6.  
  7. $postvalue="domain=$domain&product=".urlencode($product);
  8.  
  9. $ch = curl_init();
  10. curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
  11. curl_setopt($ch, CURLOPT_URL, $licenseServer);
  12. curl_setopt($ch, CURLOPT_POST, true);
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, $postvalue);
  14. $result= json_decode(curl_exec($ch), true);
  15. curl_close($ch);
  16.  
  17. if($result['status'] != 200) {
  18. $html = "<div align='center'>
  19. <table width='100%' border='0' style='padding:15px; border-color:#F00; border-style:solid; background-color:#FF6C70; font-family:Tahoma, Geneva, sans-serif; font-size:22px; color:white;'>
  20.  
  21. <tr>
  22.  
  23. <td><b>You don't have permission to use this product. The message from server is: <%returnmessage%> <br > Contact the product developer.</b></td >
  24.  
  25. </tr>
  26.  
  27. </table>
  28.  
  29. </div>";
  30. $search = '<%returnmessage%>';
  31. $replace = $result['message'];
  32. $html = str_replace($search, $replace, $html);
  33.  
  34.  
  35. die( $html );
  36.  
  37. }
  38.  
  39. //Function for declare and show the global design with classes
  40. function template($content, $title = NULL, $description = NULL, $extra = NULL){
  41. global $configs, $extra_header, $extra_footer, $location, $is_user, $role, $uinfo, $text, $ads, $nobder, $title_section, $global_title;
  42.  
  43. //Print the assets
  44. $title = ($global_title) ? $global_title : $title;
  45. $title = ($title) ? "$title - $configs[title_web]" : "$configs[title]";
  46. $extra_head = $extra_header['css'].$extra_header['js'].$extra_header['js2'].$extra_header['custom'];
  47. $extra_foot = $extra_footer['css'].$extra_footer['js'].$extra_footer['js2'].$extra_footer['custom'];
  48. $meta_extra = $extra_header['meta'];
  49. //SHOW THE LOCATION WHERE IS THE USER AND IF IT HAS A TEMPLATE FOR THE SECTION
  50. if($location == 'admin' && file_exists('./theme/'.$configs['theme'].'/view/admin/template.php'))
  51. $archive = './theme/'.$configs['theme'].'/view/admin/template.php';
  52. elseif($location == 'user' && file_exists('./theme/'.$configs['theme'].'/view/user/template.php'))
  53. $archive = './theme/'.$configs['theme'].'/view/user/template.php';
  54. elseif($location == 'access' && file_exists('./theme/'.$configs['theme'].'/view/access/template.php'))
  55. $archive = './theme/'.$configs['theme'].'/view/access/template.php';
  56. elseif($location == 'reader' && file_exists('./theme/'.$configs['theme'].'/view/reader/template.php'))
  57. $archive = './theme/'.$configs['theme'].'/view/reader/template.php';
  58. else
  59. $archive = './theme/default/view/template.php';
  60.  
  61. //show the template design
  62. include_once($archive);
  63. $show = $return;
  64.  
  65. //we declare if we want to have mod_rewrite or if we want to show the original urls
  66. if($configs['mod_rewrite'] == 1){
  67. $show = change_rewrite($show);
  68. }
  69.  
  70. echo $show;
  71. }
  72.  
  73. //Function for the section design
  74. //DON'T TOUCH THIS SECTION BECAUSE WITH THIS, THE SYSTEM SPECIFICS THE PATH OF OUR SECTION DESING
  75. function view($type, $cont = NULL, $pass = 0){
  76. global $configs, $uinfo, $is_user, $rank, $location, $text, $ads, $nobder, $title_section;
  77.  
  78. if(defined('ADMIN_ACCESS') && file_exists('./theme/'.$configs['theme'].'/view/admin/'.$location.'/'.$type.'.php'))
  79. $archive = './theme/'.$configs['theme'].'/view/admin/'.$location.'/'.$type.'.php';
  80. elseif(defined('ADMIN_ACCESS') && file_exists('./theme/'.$configs['theme'].'/view/admin/'.$type.'.php'))
  81. $archive = './theme/'.$configs['theme'].'/view/admin/'.$type.'.php';
  82. .....................................................................
  83. ........................................
  84. ................
Advertisement
Add Comment
Please, Sign In to add comment