コード例 #1
0
ファイル: sample.php プロジェクト: nouphet/rata
<?php

require "./qrcode_img.php";
Header("Content-type: image/png");
$data = "01234567";
$z = new Qrcode_image();
#$z->set_qrcode_version(1);           # set qrcode version 1
#$z->set_qrcode_error_correct("H");   # set ecc level H
#$z->set_module_size(3);              # set module size 3pixel
#$z->set_quietzone(5);                # set quietzone width 5 modules
$z->qrcode_image_out($data, "png");
#$z->image_out($z->cal_qrcode($data),"png");   #old style
コード例 #2
0
ファイル: category.php プロジェクト: nouphet/rata
            if ($gnavi_indexpage == 'map') {
                $xoops_breadcrumbs[] = array('url' => XOOPS_URL . '/modules/' . $mydirname . '/index.php', 'name' => $xoopsModule->getVar('name'));
                $xoops_breadcrumbs[] = array('name' => _MD_GNAV_CAT_ITEMLIST);
                $pagetitle = _MD_GNAV_CAT_ITEMLIST;
            } else {
                $xoops_breadcrumbs[] = array('name' => $xoopsModule->getVar('name'));
                $pagetitle = $xoopsModule->getVar('name');
            }
            $xoopsTpl->assign('subcategories', gnavi_get_sub_categories(0, $cattree));
            $xoopsTpl->assign('category_options', gnavi_get_cat_options());
            if ($gnavi_mobile_useqr) {
                if (!is_file("{$qrimg_dir}/index.png")) {
                    gnavi_check_folders();
                    if (is_file($gnavi_qrcode_path)) {
                        require_once $gnavi_qrcode_path;
                        $qrimage = new Qrcode_image();
                        $qrimage->set_module_size($gnavi_mobile_useqr);
                        $qrimage->qrcode_image_out("{$mod_url}/", "png", "{$qrimg_dir}/index.png");
                        $xoopsTpl->assign('qrimg', "{$qrimg_url}/index.png");
                    }
                } else {
                    $xoopsTpl->assign('qrimg', "{$qrimg_url}/index.png");
                }
            }
            $where = "cid > 0";
            $get_append = "";
        }
    }
}
//more assign
$xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs);
コード例 #3
0
ファイル: api2.php プロジェクト: xiebaochun/qrcode-generator
$level = $_GET['level'];
$radio = $_GET['radio'];
$logo = $_GET['logo'];
if ($logo != "") {
    $logo = 'php/' . $logo;
}
$ccolor = "#000000";
$filepath = "./imgs";
include "qrcode_img.php";
/**
 * 输出二维码
 * @param type $org_data
 * @param type $filename 图片名
 * @param type $filetype 图片后缀
 * @param type $imgwh 图片大小
 * @param type $filelogo 图片logo
 * @param type $ptcolor 定点
 * @param type $inptcolor 内定点
 * @param type $fcolor 前景色
 * @param type $bcolor 背景色
 * @param type $ccolor 内容
 * @param type $style 样式:2液态 1直角 0圆角
 */
//qrcode_image_out($value,null,$size,$logo,null,$wk,$nk,$fg,$bg,null,$radio);
$z = new Qrcode_image();
$z->set_qrcode_error_correct($level);
# set ecc level H
$z->qrcode_image_out2($value, $filepath, $size, $logo, '', $wk, $nk, $fg, $bg, '#000000', $radio);
//$z->mkimage($value,$wk,$nk,$fg,$bg,$ccolor,$radio);
?>
 
コード例 #4
0
ファイル: item.php プロジェクト: nouphet/rata
$photo = $xoopsDB->fetchArray($prs);
if ($photo == false) {
    redirect_header($mod_url . '/', 3, _MD_GNAV_MSG_NOMATCH);
    exit;
}
$photo = gnavi_get_array_for_photo_assign($photo);
$photo = gnavi_photo_assign($photo);
$xoopsTpl->assign('lang_rating', _MD_GNAV_RAT_RATINGI);
// <title></title>
$xoopsTpl->assign('xoops_pagetitle', $photo['title']);
$xoopsTpl->assign_by_ref('photo', $photo);
if ($gnavi_mobile_useqr) {
    if (!is_file("{$qrimg_dir}/{$lid}.png")) {
        if (is_file($gnavi_qrcode_path)) {
            require_once $gnavi_qrcode_path;
            $qrimage = new Qrcode_image();
            $qrimage->set_module_size($gnavi_mobile_useqr);
            $qrimage->qrcode_image_out("{$mod_url}/?lid={$lid}", "png", "{$qrimg_dir}/{$lid}.png");
            $xoopsTpl->assign('qrimg', "{$qrimg_url}/{$lid}.png");
        }
    } else {
        $xoopsTpl->assign('qrimg', "{$qrimg_url}/{$lid}.png");
    }
}
// Category Information
if ($cid) {
    if (intval($photo['cid']) != $cid && intval($photo['cid1']) != $cid && intval($photo['cid2']) != $cid && intval($photo['cid3']) != $cid && intval($photo['cid4']) != $cid) {
        $cid = empty($photo['cid']) ? $cid : $photo['cid'];
    }
} else {
    $cid = empty($photo['cid']) ? $cid : $photo['cid'];
コード例 #5
0
ファイル: item.php プロジェクト: nunoluciano/uxcl
}
$photo = gnavi_get_array_for_photo_assign( $photo ) ;
$photo = gnavi_photo_assign($photo);
$xoopsTpl->assign( 'lang_rating' , _MD_GNAV_RAT_RATINGI ) ;
// <title></title>
$xoopsTpl->assign( 'xoops_pagetitle' , $photo['title'] ) ;
$xoopsTpl->assign_by_ref( 'photo' , $photo ) ;




if($gnavi_mobile_useqr){
	if(!is_file("$qrimg_dir/$lid.png")){
		if(is_file($gnavi_qrcode_path)){
			require_once $gnavi_qrcode_path ;
			$qrimage=new Qrcode_image;
			$qrimage->set_module_size($gnavi_mobile_useqr); 
			$qrimage->qrcode_image_out( "$mod_url/?lid=$lid","png","$qrimg_dir/$lid.png");
			$xoopsTpl->assign( 'qrimg' , "$qrimg_url/$lid.png" ) ;
		}
	}else{
		$xoopsTpl->assign( 'qrimg' , "$qrimg_url/$lid.png" ) ;
	}
}

// Category Information
if($cid){
	if(intval( $photo['cid'])!=$cid && intval( $photo['cid1'])!=$cid && intval( $photo['cid2'])!=$cid && intval( $photo['cid3'])!=$cid && intval( $photo['cid4'])!=$cid)
	$cid = empty( $photo['cid'] ) ? $cid : $photo['cid'] ;
}else{
	$cid = empty( $photo['cid'] ) ? $cid : $photo['cid'] ;