prefix ; $id = sanitize_text_field($_POST['id']); $type = sanitize_text_field($_POST['type']); $resultz = $wpdb->get_results( 'SELECT * FROM '.$prefix.'aha_api WHERE id='.$id); if(!empty($resultz)){ $key = ($resultz[0]->api_key != '' ? $resultz[0]->api_key : '' ); } require dirname (dirname( __FILE__ ) ) .'/functions/aha_curl_function.php' ; $Curl = new Aha_curl_function; $settings = $Curl->aha_settings($id) ; $categories = json_decode($settings->categories); $book_id = $categories[0]; if($type == 'single'){ $key = $key.'-'.sanitize_text_field($_POST['limit']); $bookss = $setting->aha_main_crul($key,'https://www.ahathat.com/plugin-setup/all_books') ; $bookss=json_decode($bookss); // Display a Single AHAbook foreach($bookss as $result) { $cover = ($result->cover !='')? $result->cover : 'default_cover.jpg' ; $bookCoverUrl = plugins_url('/assets/images/books_cover/'.$cover,__DIR__); $defaultCoverUrl = plugins_url('/assets/images/books_cover/default_cover.jpg',__DIR__); $bookCoverUrl = @fopen($bookCoverUrl, 'r') ? $bookCoverUrl : $defaultCoverUrl; if($book_id == $result->id){ ?>
id; ?>
cover !='')? $result->cover : 'default_cover.jpg' ; $bookCoverUrl = plugins_url('/assets/images/books_cover/'.$cover,__DIR__); $defaultCoverUrl = plugins_url('/assets/images/books_cover/default_cover.jpg',__DIR__); $bookCoverUrl = @fopen($bookCoverUrl, 'r') ? $bookCoverUrl :$defaultCoverUrl; if($book_id != $result->id){ ?>
id; ?>

limit_a ; $total= $totals + 24; ?> '24'){ ?> PRE NEXT
limit_l; $libraries = $setting->aha_main_crul($key,'https://www.ahathat.com/plugin-setup/libraries') ; $datas=json_decode($libraries); // Display AHAbooks in an AHAlibrary foreach($datas as $result) { $cover_image =($result->cover !='')? $result->cover : 'default_cover.jpg'; $cover = plugins_url('/assets/images/books_library/'.$cover_image,__DIR__); $bookdatas = $result->id; $book_ids = $categories; if($book_ids) {$idss = (in_array( $bookdatas, $book_ids) ?'checked="checked"' : '' ); }else{ $idss=''; } ?>
aha_main_crul($_POST['cat_id'],'https://www.ahathat.com/plugin-setup/search_books/'.$settings->limit_l) ; print_r($libraries); die; } die; ?>