upgrade on mysqlmanager

This commit is contained in:
2015-05-25 19:53:01 +02:00
parent 49a500fafb
commit 2347a08f1f
4 changed files with 126 additions and 82 deletions

View File

@@ -0,0 +1,20 @@
<?php
$sOutFilePath = 'logo_givaudan_48.php';
$asResult[] = '<?php';
$asResult[] = '';
foreach (glob("resize/*_48.png") as $sFileName)
{
$sImageString = base64_encode(file_get_contents($sFileName));
$asImages[] = '\''.str_replace("'", "\'", $sImageString).'\'';
}
$asResult[] = '$asImages = array('."\t".implode(', '."\n\t\t\t\t\t", $asImages).');';
$asResult[] = '';
$asResult[] = 'header(\'Content-Type: image/png\');';
$asResult[] = 'echo base64_decode($asImages[rand(0, count($asImages)-1)]);';
$asResult[] = "\n\n".'?>';
file_put_contents($sOutFilePath, implode("\n", $asResult));
chmod($sOutFilePath, 0777);
?>