class_mcQRCode.inc.php
627 Bytes
<?php
/**
* noch nicht wirklich entwickelt... eher als notiz zu verstehen
* @since 20110801 @author n@mensch.coop
* require_once('lib/phpqrcode/qrlib.php');
*/
class mcQRCode {
public static function createQRCode($param_txt, $param_filename=null, $param_dir=null) {
if($param_txt && $param_filename) {
if(!is_null($param_filename)) {
if(is_null($param_dir)) {
$param_dir = mcConfig::getConfig('tmpdir');
}
QRcode::png($param_txt, $param_dir.$param_filename);
return $param_dir.$param_filename;
} else {
return QRcode::png($param_txt);
}
} else {
return false;
}
}
}
?>