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
$inFile = '/var/www/...'; | |
$outFile = '/var/www/...'; | |
$image = new Imagick($inFile); | |
$width = $height = 100; | |
$image = new Imagick($inFile); | |
$geo = $image->getImageGeometry(); | |
if(($geo['width']/$width) < ($geo['height']/$height)) | |
{ | |
$image->cropImage($geo['width'], floor($height*$geo['width']/$width), 0, (($geo['height']-($height*$geo['width']/$width))/2)); | |
} |
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
$inFile = '/var/www/...'; | |
$outFile = '/var/www/...'; | |
$image = new Imagick($inFile); | |
$targetWidth = 130; | |
$targetHeight = 79; | |
$source = $image->getImageGeometry(); | |
if(($source['width'] / $source['height']) < ($targetWidth / $targetHeight)) { | |
$scale = $source['width'] / $targetWidth; |
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
find -type f -name '*.jpg*' -exec rename 's/[^a-zA-Z0-9.\/]//' {} \; |
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 getCountryFromCity($city) | |
{ | |
if (isset($this->country_city_array[$city])) { | |
return $this->country_city_array[$city]; | |
} else { | |
//get | |
$url = 'http://nominatim.openstreetmap.org/search?city=' . urlencode($city) . '&format=json&limit=1&addressdetails=1&accept-language=en'; | |
$c = curl_init(); | |
$agent = random_user_agent(); |
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 | |
/* Hide out of stock products */ | |
/* bsh - brandlift.eu */ | |
if ((!file_exists('init.php') || !file_exists('config/config.inc.php')) && _COOKIE_KEY_ != '') { | |
die('Error: An include file not found. Check the path.'); | |
} else { | |
include('config/config.inc.php'); | |
require_once('init.php'); | |
} |
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 | |
/* Copy lang */ | |
/* bsh - brandlift.eu */ | |
if ((!file_exists('init.php') || !file_exists('config/config.inc.php')) && _COOKIE_KEY_ != '') { | |
die('Error: An include file not found. Check the path.'); | |
} else { | |
include('config/config.inc.php'); | |
require_once('init.php'); | |
} |
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 | |
/** | |
* Procedural drop in replacement for legacy projects using the MySQL function | |
* | |
* @author Sjoerd Maessen | |
* @version 0.1 | |
*/ | |
// Make sure the MySQL extension is not loaded and there is no other drop in replacement active | |
if (!extension_loaded('mysql') && !function_exists('mysql_connect')) { |
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 auth_redirect() | |
{ | |
} | |
function wp_get_current_user() | |
{ | |
global $current_user; | |
wp_set_current_user(1); |
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 static function trackBooking(Order $order) | |
{ | |
if (! isset($order->id)) { | |
return false; | |
} | |
$po_api_username = config('constants.po_api_username'); | |
$po_api_password = config('constants.po_api_password'); | |
$ContractID = config('constants.po_api_contract_id'); | |
$TransactionID = time().rand(1, 9999); |
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
add_action('fix_expired_sales_price', 'fix_expired_sales_price_function'); | |
/** | |
* Törli az akciós árat, ha az akció ideje már lejárt és mégis | |
* bent marad az ár és a dátum. Valemelyik akciókkal kapcsolatos | |
* plugin hibája. | |
* | |
* Az actiont wp cron futtatja naponta kétszer. | |
* |
OlderNewer