if(file_exists(XOOPS_ROOT_PATH."/modules/tadtools/mobile_device_detect.php")){ include_once XOOPS_ROOT_PATH."/modules/tadtools/mobile_device_detect.php"; mobile_device_detect(true, false, true, true, true, true, true, 'pda.php', false); }
$modversion['blocks'][0]['file'] = "contact_qrcode.php"; $modversion['blocks'][0]['name'] = 'QR Code '; $modversion['blocks'][0]['description'] = '產生連到手持裝置頁面的QR Code條碼'; $modversion['blocks'][0]['show_func'] = "contact_qrcode_show"; $modversion['blocks'][0]['template'] = "contact_qrcode.html";
<?php function contact_qrcode_show($options){ if(preg_match("/contact\/index.php\?sn=/i", $_SERVER['REQUEST_URI'])){ $url=str_replace("index.php","pda.php",$_SERVER['REQUEST_URI']); }elseif(preg_match("/contact\/$/i", $_SERVER['REQUEST_URI'])){ $url=$_SERVER['REQUEST_URI']."pda.php"; }else{ return ; } $block=""; if(file_exists(TADTOOLS_PATH."/qrcode.php")){ include_once TADTOOLS_PATH."/qrcode.php"; $qrcode= new qrcode(); $block=$qrcode->render($url); } return $block; } ?>