This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript' src='class/aj-birthday.js'></script> | |
<script type='text/javascript'> | |
$(function() { | |
$('.birthday-zone-$fname').ajbirthday(); | |
$('#bi_all_$fname').val(''); | |
bi_auto_com_$fname(); | |
}); | |
function bi_auto_com_$fname() { | |
$('.day').change(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//取得分頁工具 | |
if(!function_exists('getPageBar_bs')){ | |
function getPageBar_bs($sql="",$show_num=20,$page_list=10,$to_page="",$url_other=""){ | |
global $xoopsDB; | |
if(empty($show_num))$show_num=20; | |
if(empty($page_list))$page_list=10; | |
$result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'],10, mysql_error()."<br>$sql"); | |
$total=$xoopsDB->getRowsNum($result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
後端必須加入 | |
$dirname = basename(dirname(__FILE__)); | |
$_SESSION['xoops_mod_name']=$dirname; | |
讓elfinder作用 | |
*/ | |
<link rel='stylesheet' type='text/css' href='<{$xoops_url}>/modules/tadtools/ckeditor/mathquill.css' /> | |
<script src='<{$xoops_url}>/modules/tadtools/ckeditor/mathquill.js'></script> | |
<script type='text/javascript' src='<{$xoops_url}>/modules/tadtools/ckeditor/ckeditor.js'></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* XSS filter | |
* | |
* This was built from numerous sources | |
* (thanks all, sorry I didn't track to credit you) | |
* | |
* It was tested against *most* exploits here: http://ha.ckers.org/xss.html | |
* WARNING: Some weren't tested!!! | |
* Those include the Actionscript and SSI samples, or any newer than Jan 2011 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="" enctype="multipart/form-data" method="post"> | |
<input id="file" name="file" type="file" /> | |
<input id="Submit" name="submit" type="submit" value="Submit" /> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
//加入上傳檔案MIME types篩選 | |
//新增ext2mime函數,可將副檔名轉換為MIME types,提供給$file_handle->allowed使用 | |
//$allow = "doc;docx;pdf",利用分號;區分允許上傳的檔案類型 | |
$TadUpFiles->upload_file($upname,$width,$thumb_width,$files_sn,$desc,$safe_name=false,$hash=false,$return_col,$allow); | |
//上傳表單(enctype='multipart/form-data') | |
include_once XOOPS_ROOT_PATH."/modules/tadtools/TadUpFiles.php" ; | |
$TadUpFiles=new TadUpFiles("模組名稱",$subdir,$file="/file",$image="/image",$thumbs="/image/.thumbs"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//列出所有照片 | |
function list_photos($csn = "", $uid = "") | |
{ | |
global $xoopsModuleConfig, $xoopsTpl, $tadgallery, $xoopsDB; | |
if (!file_exists(XOOPS_ROOT_PATH . "/modules/tadtools/fancybox.php")) { | |
redirect_header("index.php", 3, _MA_NEED_TADTOOLS); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//刪除確認的JS | |
if (!file_exists(XOOPS_ROOT_PATH . "/modules/tadtools/sweet_alert.php")) { | |
redirect_header("index.php", 3, _MD_NEED_TADTOOLS); | |
} | |
include_once XOOPS_ROOT_PATH . "/modules/tadtools/sweet_alert.php"; | |
$sweet_alert_obj = new sweet_alert(); | |
//產生token | |
$token = new XoopsSecurity(); | |
$render_token = $token->createToken(0, 'csrf_token'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
modules/system/preloads/core.php | |
*/ | |
$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); | |
$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/bootstrap-notify.min.js'); | |
$GLOBALS['xoTheme']->addScript('', array('type' => 'text/javascript'), ' | |
$(document).ready(function(){ | |
$.notify({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xoops內過濾函數htmlSpecialChars效果與php函數htmlspecialchars差異:不會將 & 轉換為 & | |
使用phpword輸出內容時,必須將&符號進行轉換 | |
function htmlSpecialChars($text, $quote_style = ENT_QUOTES, $charset = null, $double_encode = true) | |
{ | |
if (version_compare(phpversion(), '5.2.3', '>=')) { | |
$text = htmlspecialchars($text, $quote_style, $charset ? $charset : (defined('_CHARSET') ? _CHARSET : 'UTF-8'), $double_encode); | |
} else { | |
$text = htmlspecialchars($text, $quote_style); | |
} |