This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine on | |
| RewriteCond "%{HTTP_REFERER}" "!http://localhost" [NC] | |
| RewriteRule \.(pdf|xls|xlsx|jpeg|jpg|png|msg|numbers|doc|docx|csv|zip|tar)$ - [F] | |
| #change localhost to mydomain.co.uk change pdf|xls|xlsx to what ever you require |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function claimLinePrice() | |
| { | |
| $quote_number = \Session::get('project_quote_number'); | |
| return \DB::select("SELECT quote_builder_line_price_id, quote_builder_line_price_description, quote_builder_line_price_description2, quote_builder_line_price_description3, | |
| quote_builder_line_price_description4, quote_builder_line_price_description5, quote_builder_line_price_description6, | |
| quote_builder_line_price_description7, | |
| quote_builder_line_price_description8, quote_builder_line_price_description9, quote_builder_line_price_description10, | |
| quote_builder_line_price,quote_builder_line_price2,quote_builder_line_price3,quote_builder_line_price4,quote_builder_line_price5,quote_builder_line_price6, | |
| quote_builder_line_price7,quote_builder_line_price8,quote_builder_line_price9,quote_builder_line_price10, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select *, | |
| str_to_date(concat(yearweek(created_at), ' friday'), '%X%V %W') as end_of_week_date | |
| from install_completed | |
| order by end_of_week_date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //preload images for canvas on tag design | |
| function preloadImages(srcs) { | |
| if (!preloadImages.cache) { | |
| preloadImages.cache = []; | |
| } | |
| var img; | |
| for (var i = 0; i < srcs.length; i++) { | |
| img = new Image(); | |
| img.src = srcs[i]; | |
| preloadImages.cache.push(img); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Repositories; | |
| ini_set('max_execution_time', 0); | |
| use App\Http\Interfaces\GenerateInterface; | |
| use App\Muhimbi\PdfConverterService; | |
| use PHPExcel_IOFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 'data goes here'; | |
| ob_flush(); | |
| flush(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| header('Content-Type: application/vnd.ms-excel'); | |
| header('Content-Disposition: attachment;filename="filename.xls"'); | |
| header('Cache-Control: max-age=0'); | |
| $objWriter = PHPExcel_IOFactory::createWriter($excel_obj, 'Excel2007'); | |
| $objWriter->save('php://output'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | |
| dd($trace); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function recursive_copy($src,$dst) { | |
| $dir = opendir($src); | |
| @mkdir($dst); | |
| while(false !== ( $file = readdir($dir)) ) { | |
| if (( $file != '.' ) && ( $file != '..' )) { | |
| if ( is_dir($src . '/' . $file) ) { | |
| recursive_copy($src . '/' . $file,$dst . '/' . $file); | |
| } | |
| else { |