Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $domain=$_SERVER['SERVER_NAME'];
- $product="40";
- $licenseServer = "http://harryleverman.com/license/api/";
- $postvalue="domain=$domain&product=".urlencode($product);
- $ch = curl_init();
- curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_URL, $licenseServer);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postvalue);
- $result= json_decode(curl_exec($ch), true);
- curl_close($ch);
- if($result['status'] != 200) {
- $html = "<div align='center'>
- <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;'>
- <tr>
- <td><b>You don't have permission to use this product. The message from server is: <%returnmessage%> <br > Contact the product developer.</b></td >
- </tr>
- </table>
- </div>";
- $search = '<%returnmessage%>';
- $replace = $result['message'];
- $html = str_replace($search, $replace, $html);
- die( $html );
- }
- //Function for declare and show the global design with classes
- function template($content, $title = NULL, $description = NULL, $extra = NULL){
- global $configs, $extra_header, $extra_footer, $location, $is_user, $role, $uinfo, $text, $ads, $nobder, $title_section, $global_title;
- //Print the assets
- $title = ($global_title) ? $global_title : $title;
- $title = ($title) ? "$title - $configs[title_web]" : "$configs[title]";
- $extra_head = $extra_header['css'].$extra_header['js'].$extra_header['js2'].$extra_header['custom'];
- $extra_foot = $extra_footer['css'].$extra_footer['js'].$extra_footer['js2'].$extra_footer['custom'];
- $meta_extra = $extra_header['meta'];
- //SHOW THE LOCATION WHERE IS THE USER AND IF IT HAS A TEMPLATE FOR THE SECTION
- if($location == 'admin' && file_exists('./theme/'.$configs['theme'].'/view/admin/template.php'))
- $archive = './theme/'.$configs['theme'].'/view/admin/template.php';
- elseif($location == 'user' && file_exists('./theme/'.$configs['theme'].'/view/user/template.php'))
- $archive = './theme/'.$configs['theme'].'/view/user/template.php';
- elseif($location == 'access' && file_exists('./theme/'.$configs['theme'].'/view/access/template.php'))
- $archive = './theme/'.$configs['theme'].'/view/access/template.php';
- elseif($location == 'reader' && file_exists('./theme/'.$configs['theme'].'/view/reader/template.php'))
- $archive = './theme/'.$configs['theme'].'/view/reader/template.php';
- else
- $archive = './theme/default/view/template.php';
- //show the template design
- include_once($archive);
- $show = $return;
- //we declare if we want to have mod_rewrite or if we want to show the original urls
- if($configs['mod_rewrite'] == 1){
- $show = change_rewrite($show);
- }
- echo $show;
- }
- //Function for the section design
- //DON'T TOUCH THIS SECTION BECAUSE WITH THIS, THE SYSTEM SPECIFICS THE PATH OF OUR SECTION DESING
- function view($type, $cont = NULL, $pass = 0){
- global $configs, $uinfo, $is_user, $rank, $location, $text, $ads, $nobder, $title_section;
- if(defined('ADMIN_ACCESS') && file_exists('./theme/'.$configs['theme'].'/view/admin/'.$location.'/'.$type.'.php'))
- $archive = './theme/'.$configs['theme'].'/view/admin/'.$location.'/'.$type.'.php';
- elseif(defined('ADMIN_ACCESS') && file_exists('./theme/'.$configs['theme'].'/view/admin/'.$type.'.php'))
- $archive = './theme/'.$configs['theme'].'/view/admin/'.$type.'.php';
- .....................................................................
- ........................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment