Commit c88f6081 by sn

service/QRCode

1 parent 7deb33ed
File mode changed
...@@ -418,10 +418,6 @@ class mcPUIX_DOM { ...@@ -418,10 +418,6 @@ class mcPUIX_DOM {
$DOMElement->appendChild($DOMBE); $DOMElement->appendChild($DOMBE);
} else if($param_ValuesAttributes['type'] == mcPUIX::FORM_TYPE_SEOLINK) { } else if($param_ValuesAttributes['type'] == mcPUIX::FORM_TYPE_SEOLINK) {
// D::show($value, '$param_ValuesAttributes') ;
// $var_BCLink = SEOLink::getSEOLink($param_HostAccount, $param_iStorable, $PartOfObj, null, $param_EdgeName);
// $var_labelarray = Language::getClassLinks($param_EdgeName, CONSTKindOf::LINK_SHOWBASISCLIPBOARD);
if(is_array($value)) { if(is_array($value)) {
$DOMSEOLink = DOMElementHelper::getSEOLinkDOMElement($param_DOMDocument, $value['Host'], $value['SEOLink'], $value['Language'], $value['OptionalValues']); $DOMSEOLink = DOMElementHelper::getSEOLinkDOMElement($param_DOMDocument, $value['Host'], $value['SEOLink'], $value['Language'], $value['OptionalValues']);
$DOMElement->appendChild($DOMSEOLink); $DOMElement->appendChild($DOMSEOLink);
......
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*?)$ index.php?qrcode=$1 [QSA,L]
<?php
/**
* @var link to the basic path from the mcClasses dir
*/
$__BASEPATH_EX='../../';
/**
* @var link from the basic path to the mcClasses dir,
* copy this var in the main basepath.inc.php if you want use include.php
*/
$__PATH_to_mcClasses= $__BASEPATH_EX .'';
?>
\ No newline at end of file
<?php
/**
* REQUIRE:
* * apt-get install php5-imagick
* * .htaccess -> _htaccess
* * Apache rewrite Modul
*
*
*/
require_once('basepath.inc.php');
require_once($__PATH_to_mcClasses . 'include.php');
if(array_key_exists('qrcode', $_POST) && $_POST['qrcode']) {
$qrtxt = $_POST['qrcode'];
$qrcode_size = $_POST['qrcode_size'];
$margin = $_POST['qrcode_margin'];
$tmp_qrfilepath = 'tmp/tmp_qrfile.png';
QRcode::png($qrtxt, $tmp_qrfilepath , $level = QR_ECLEVEL_L, $size = 10, $margin, $saveandprint=false);
$qr_image = new Imagick($tmp_qrfilepath);
$qr_image->scaleImage($qrcode_size,$qrcode_size);
header('Content-type: image/png');
echo $qr_image;
} else {
?>
<form action="index.php" method="post">
<table border="0" cellpadding="5" cellspacing="0" bgcolor="#E0E0E0">
<tr>
<td align="right">size:</td>
<td><input name="qrcode_size" type="text" size="10" maxlength="10" value="600"></td>
</tr>
<tr>
<td align="right">margin:</td>
<td><input name="qrcode_margin" type="text" size="10" maxlength="10" value="2"></td>
</tr>
<tr>
<td align="right" valign="top">text to qrcode:</td>
<td><textarea name="qrcode" cols="50" rows="10"></textarea></td>
</tr>
<tr>
<td align="right">Formular:</td>
<td>
<input type="submit" value=" Absenden ">
<input type="reset" value=" Abbrechen">
</td>
</tr>
</table>
</form>
<?
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
//$image->thumbnailImage(100, 0);
// bild größe skalieren
// $image->adaptiveResizeImage(1024,768);
// $image->scaleImage(800,800);
// $qr_image->setSize(800,800);
?>
\ No newline at end of file
<?php
//$simple_curl = curl_init("http://localhost/service/qrcode/test");
$simple_curl = curl_init("http://heise.de");
$curloutput = curl_exec($simple_curl);
echo $curloutput;
?>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!