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 fFormatNumberToKMB($value){ | |
| if ($value > 999 && $value <= 999999) { | |
| $result = floor($value / 1000) . ' K'; | |
| } elseif ($value > 999999 && $value <= 999999999) { | |
| $result = floor($value / 1000000) . ' M'; | |
| } elseif ($value > 999999999){ | |
| $result = floor($value / 1000000000) . ' B'; | |
| }else { |
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
| 1. Add following input file right after textarea field... | |
| <input name="image" type="file" id="upload" class="hidden" onchange=""> | |
| 2. Add the following code in tinymce jquery code block... | |
| file_picker_callback: function(callback, value, meta) { | |
| if (meta.filetype == 'image') { | |
| $('#upload').trigger('click'); | |
| $('#upload').on('change', function() { | |
| var file = this.files[0]; |
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
| 'nano filename.txt' command to open a file in cmd | |
| 'cat filename.txt' command to show the updated file after edit | |
| 'chown -R username.username foldername' to change user permission of a folder |
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 | |
| $data = [1,2,3,4,5,6,7,8,9,10]; | |
| $i=1; | |
| $count = count($data); | |
| foreach($ar as $a){ | |
| if($i == 1) echo '<div class="item">'; | |
| echo '<div>'.$i.'</div>'; |
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
| $this->validate($request, [ | |
| 'heading' => 'required', | |
| 'category' => 'required', | |
| 'details' => 'required', | |
| ],[ | |
| 'heading.required' => 'লেখার শিরোনাম প্রদান করুন!', | |
| 'category.required' => 'একটি ক্যাটাগরি নির্বাচন করুন!', | |
| 'details.required' => 'বিস্তারিত লেখা প্রদান করুন!', | |
| ]); |
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 | |
| //To start using reCAPTCHA, you need to sign up for an API key pair for your site from https://www.google.com/recaptcha/admin#list | |
| $siteKey = "6LcqlUAUAAAAAFqZqFzhtEHApepRVPtv-Xynkub9"; | |
| $secretKey = "6LcqlUAUAAAAADt1b9okVcSrgC0461J9NyTzNqlY"; | |
| $gres = $_POST['g-recaptcha-response']; | |
| $ip = $_SERVER['REMOTE_ADDR']; | |
| $suc = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secretKey.'&response='.$gres.'&remoteip='.$ip); | |
| $res = json_decode($suc); |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>Fan Club List</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
| </head> |
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 | |
| // Load the logo stamp and the photo to apply the watermark to | |
| $logo = imagecreatefrompng('https://cdn.jagonews24.com/media/common/og-logo.png'); | |
| //$logo = imagecolorallocate($logo,0,0,0); | |
| $img = imagecreatefromjpeg('https://cdn.jagonews24.com/media/imgAll/2018June/shahin-cover-20180711084009.jpg'); | |
| // Set the margins for the stamp and get the height/width of the stamp image | |
| $marge_right = 10; | |
| $marge_bottom = 10; |
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 uniqueNumber(){ | |
| $unqNo = strtotime(date("Ymdhis"))*999; | |
| return $unqNo; | |
| } |