示例#1
0
 function get_download_link()
 {
     $header = new header();
     $header->ebook('Free ebook download', 'en');
     if (isset($_REQUEST['id'])) {
         $data_update = $this->db->select('*')->from('ebook_index_en')->where('id', $_REQUEST['id'])->get()->result_array();
         foreach ($data_update as $key) {
         }
         $data['update_data'] = file_get_contents($key['link']);
         $data['id'] = $_REQUEST['id'];
     }
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     $this->load->view('ebook/download', $data);
 }
示例#2
0
 function en()
 {
     $content = "";
     $header = new header();
     if (isset($_REQUEST['id'])) {
         $id = str_replace('"', '', stripslashes($_REQUEST['id']));
         $header->ebook("Free ebook download", "en");
         $url = "http://en.bookfi.org/" . $id;
         $content = file_get_contents($url);
         $content = str_replace('http://bookre.org/', '/ebook/', $content);
         $content = str_replace('Читать', 'Read online', $content);
         $content = str_replace('<a href="/" class="det_logo">Bookfi.org</a>', '<a href="http://myweb.pro.vn/ebook/en" class="det_logo">Free eBook download</a>', $content);
         $content = str_replace('<a class="buttons active" href="howtodonate.php">Donate</a>', '', $content);
     } else {
         $header->ebook("Free ebook download", "en");
         $content = file_get_contents('http://en.bookfi.org/Arts-%26-Photography-Architecture-cat1');
         $content = str_replace('href=', 'data-href=', $content);
         $content = str_replace('Читать', 'Read online', $content);
         $content = str_replace('http://bookfi.org', '', $content);
         $content = str_replace('<meta', '<meta class="xoa"', $content);
         $content = str_replace('<script', '<script class="xoa"', $content);
         $content = str_replace('http://en.bookfi.org/', 'http://myweb.pro.vn', $content);
         $data['csrf_test_name'] = $this->security->get_csrf_hash();
     }
     $data['content'] = $content;
     $this->load->view('ebook/en', $data);
 }