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 upload_image($destination_dir, $name_media_field, $intfecha){ | |
| $tmp_name = $_FILES[$name_media_field]['tmp_name']; | |
| if (is_dir($destination_dir) && is_uploaded_file($tmp_name)) { | |
| $img_file = strtolower(str_replace(" ", "", $_FILES[$name_media_field]['name'])); | |
| $img_type = $_FILES[$name_media_field]['type']; | |
| if (((strpos($img_type, "gif") || strpos($img_type, "jpeg") || strpos($img_type, "jpg")) || strpos($img_type, "png"))) { | |
| if (move_uploaded_file($tmp_name, $destination_dir . '/' . $intfecha . $img_file)) return true; | |
| } |
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 urls_amigables($url) { | |
| $url = strtolower($url); | |
| $find = array('á', 'é', 'í', 'ó', 'ú', 'ñ'); | |
| $repl = array('a', 'e', 'i', 'o', 'u', 'n'); | |
| $url = str_replace ($find, $repl, $url); | |
| $find = array(' ', '&', '\r\n', '\n', '+'); |
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\Traits; | |
| trait DistancePosition | |
| { | |
| // $lat1, $lon1, $lat2, $lon2 | |
| private function CalcDistance( $params, $unit="K") { | |
| extract($params); |
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
| { | |
| // The tab key will cycle through the settings when first created | |
| // Visit http://wbond.net/sublime_packages/sftp/settings for help | |
| // sftp, ftp or ftps | |
| "type": "ftp", | |
| "save_before_upload": true, | |
| "upload_on_save": true, | |
| "sync_down_on_open": false, |
NewerOlder