当前位置: 首页>>代码示例>>PHP>>正文


PHP CRMSmarty::display方法代码示例

本文整理汇总了PHP中CRMSmarty::display方法的典型用法代码示例。如果您正苦于以下问题:PHP CRMSmarty::display方法的具体用法?PHP CRMSmarty::display怎么用?PHP CRMSmarty::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRMSmarty的用法示例。


在下文中一共展示了CRMSmarty::display方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show_error_import

function show_error_import($message)
{
    global $current_language;
    $import_mod_strings = return_module_language($current_language, "Import");
    global $theme;
    global $log;
    global $mod_strings;
    global $app_strings;
    global $current_user;
    include 'themes/' . $theme . '/header.php';
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $log->info("Upload Error");
    $smarty = new CRMSmarty();
    $smarty->assign("MOD", $import_mod_strings);
    $smarty->assign("APP", $app_strings);
    if (isset($_REQUEST['return_module'])) {
        $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']);
    }
    if (isset($_REQUEST['return_action'])) {
        $smarty->assign("RETURN_ACTION", $_REQUEST['return_action']);
    }
    $smarty->assign("THEME", $theme);
    $category = getParenttab();
    $smarty->assign("CATEGORY", $category);
    $smarty->assign("IMAGE_PATH", $image_path);
    //$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
    $smarty->assign("MODULE", "SalesOrder");
    $smarty->assign("MESSAGE", $message);
    $smarty->display('SalesOrder/Importerror.tpl');
}
开发者ID:Pengzw,项目名称:c3crm,代码行数:31,代码来源:ImportSave.php

示例2: show_error_import

/**	function used to show the error message occured during import process
 *	@param	string	$message - Error message to display in the screen, where the passed error message will be displayed in screen using Importerror.tpl file
 */
function show_error_import($message)
{
    global $import_mod_strings;
    global $theme;
    global $log;
    global $mod_strings;
    global $app_strings;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    require_once $theme_path . 'layout_utils.php';
    $log->info("Upload Error");
    $smarty = new CRMSmarty();
    $smarty->assign("MOD", $mod_strings);
    $smarty->assign("APP", $app_strings);
    if (isset($_REQUEST['return_module'])) {
        $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']);
    }
    if (isset($_REQUEST['return_action'])) {
        $smarty->assign("RETURN_ACTION", $_REQUEST['return_action']);
    }
    $smarty->assign("THEME", $theme);
    $category = getParenttab();
    $smarty->assign("CATEGORY", $category);
    $smarty->assign("IMAGE_PATH", $image_path);
    //$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
    $smarty->assign("MODULE", $_REQUEST['module']);
    $smarty->assign("MESSAGE", $message);
    $smarty->display('Importerror.tpl');
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:32,代码来源:error.php

示例3: getSearchListHeaderValues

$focus->popup_type = $popuptype;
$url_string .= '&popuptype=' . $popuptype;
if (isset($_REQUEST['select']) && $_REQUEST['select'] == 'enable') {
    $url_string .= '&select=enable';
}
if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != '') {
    $url_string .= '&return_module=' . $_REQUEST['return_module'];
}
$smarty->assign("URLSTRING", $url_string);
if ($viewid != '') {
    $url_string .= "&viewname=" . $viewid;
}
$listview_header_search = getSearchListHeaderValues($focus, $currentModule, $url_string, $sorder, $order_by);
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$smarty->assign("ALPHABETICAL", $alphabetical);
$listview_header = getSearchListViewHeader($focus, $currentModule, $url_string, $sorder, $order_by);
$smarty->assign("LISTHEADER", $listview_header);
$listview_entries = getSearchListViewEntries($focus, $currentModule, $list_result, $navigation_array);
$smarty->assign("LISTENTITY", $listview_entries);
$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string, $currentModule, "Popup", $viewid);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("RECORD_COUNTS", $record_string);
$smarty->assign("POPUPTYPE", $popuptype);
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') {
    $smarty->display("PopupContents.tpl");
} else {
    $smarty->display("Popup.tpl");
}
?>

开发者ID:Pengzw,项目名称:c3crm,代码行数:29,代码来源:Popup.php

示例4: getAccountNameInfo

    }
} else {
    //$smarty->assign("APPROVE_STATUS",0);
}
$tabid = getTabid("Qunfas");
$data = getSplitDBValidationData($focus->tab_name, $tabid);
$smarty->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']);
$smarty->assign("MODULE", $currentModule);
if ($module_relatedmodule != "" || isset($module_enable_attachment) && $module_enable_attachment) {
    if ($singlepane_view == 'true') {
        $related_array = getRelatedLists($currentModule, $focus);
        $smarty->assign("RELATEDLISTS", $related_array);
    }
    $smarty->assign("SinglePane_View", $singlepane_view);
}
$smarty->display("Qunfas/DetailView.tpl");
function getAccountNameInfo($id)
{
    global $adb;
    $query = "select accountname from ec_account where accountid='{$id}' and deleted=0";
    $result = $adb->query($query);
    $num = $adb->num_rows($result);
    if ($num > 0) {
        $row = $adb->fetch_array($result);
        return $row['accountname'];
    } else {
        return '';
    }
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:DetailView.php

示例5: getParenttab

$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$log->info("Import Step last");
$parenttab = getParenttab();
//This Buttons_List1.tpl is is called to display the add, search, import and export buttons ie., second level tabs
$smarty = new CRMSmarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("IMP", $import_mod_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULE", 'SalesOrder');
$smarty->assign("SINGLE_MOD", 'SalesOrder');
$smarty->assign("CATEGORY", 'Accounts');
$smarty->display("Buttons_List1.tpl");
$skipped_record_count = $_SESSION['import_skipped_record_count'];
$import_mod_strings = return_module_language($current_language, "Import");
if (isset($_SESSION['import_message'])) {
    $themessage = $_SESSION['import_message'];
    @session_unregister('import_message');
    ?>
	<br>

	<table align="center" cellpadding="5" cellspacing="0" width="95%" class="mailClient importLeadUI small">
	   <tr>
		<td height="50" valign="middle" align="left" class="mailClientBg genHeaderSmall">
			 <?php 
    echo $import_mod_strings['LBL_MODULE_NAME'];
    ?>
 <?php 
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:ImportSteplast.php

示例6: getCFListEntries

$smarty = new CRMSmarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$smarty->assign("IMAGE_PATH", $image_path);
$multifieldid = $_REQUEST["multifieldid"];
$fieldinfo = getMultiFieldInfo($multifieldid, false);
$smarty->assign("FieldInfo", $fieldinfo);
$tab_mod_strings = return_module_language($current_language, $fieldinfo['modulename']);
$smarty->assign("CMOD", $tab_mod_strings);
$smarty->assign("FieldInfo", $fieldinfo);
$smarty->assign("CFENTRIES", getCFListEntries($fieldinfo["fields"], $multifieldid, $tab_mod_strings));
$smarty->display('Settings/EditMultiCustomField.tpl');
/**
 * Function to get customfield entries
 * @param string $module - Module name
 * return array  $cflist - customfield entries
 */
function getCFListEntries($fields, $multifieldid, $tab_mod_strings)
{
    global $adb;
    global $theme;
    global $mod_strings;
    global $app_strings;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    //$dbQuery = "select fieldid,columnname,fieldlabel,uitype,displaytype from ec_field where tabid=".$tabid." and generatedtype=2 order by sequence";
    $count = 1;
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:EditMultiCustomField.php

示例7: getUserslist

$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'Qunfa');
$smarty->assign("BUTTONS", $other_text);
$smarty->assign("CATEGORY", $category);
$smarty->assign("CHANGE_OWNER", getUserslist());
//$sjid = rand(10000000,99999999);
//删除多余
$adb->query("delete from ec_maillists where deleted=1");
//生成事件id
$sjid = $adb->getUniqueID("ec_crmentity");
$sql = "insert into ec_maillists(maillistsid,deleted) values(" . $sjid . ",1)";
$adb->query($sql);
$smarty->assign("sjid", $sjid);
$adb->query("insert into ec_crmentity (crmid,setype,smcreatorid,smownerid,createdtime,modifiedtime) values('" . $sjid . "','Maillists'," . $current_user->id . "," . $current_user->id . ",'" . $nowdatetime . "','" . $nowdatetime . "')");
$res = $adb->query("select * from ec_systems where smownerid='" . $current_user->id . "'");
$from_name = $adb->query_result($res, 0, 'from_name');
$from_email = $adb->query_result($res, 0, 'from_email');
$smarty->assign("from_name", $from_name);
$smarty->assign("from_email", $from_email);
//Retreive the List View Table Header
if ($viewid != '') {
    $url_string .= "&viewname=" . $viewid;
}
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') {
    $smarty->display("Maillists/ListViewEntries.tpl");
} else {
    $smarty->display("Maillists/ListView.tpl");
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:ListView.php

示例8: CRMSmarty

    $image_path = $theme_path . "images/";
    require_once $theme_path . 'layout_utils.php';
    $smarty = new CRMSmarty();
    if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
        $focus->id = "";
    }
    if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
        $smarty->assign("OP_MODE", $_REQUEST['mode']);
    }
    if (!$_SESSION['rlvs'][$module]) {
        unset($_SESSION['rlvs']);
    }
    $category = getParentTab();
    $smarty->assign("CATEGORY", $category);
    $smarty->assign("UPDATEINFO", updateInfo($focus->id));
    if (isset($focus->name)) {
        $smarty->assign("NAME", $focus->name);
    }
    $related_array = getRelatedLists("Qunfatmps", $focus);
    $smarty->assign("RELATEDLISTS", $related_array);
    $smarty->assign("ID", $focus->id);
    $smarty->assign("MODULE", $currentmodule);
    $smarty->assign("SINGLE_MOD", 'Qunfatmp');
    $smarty->assign("MOD", $mod_strings);
    $smarty->assign("APP", $app_strings);
    $smarty->assign("THEME", $theme);
    $smarty->assign("IMAGE_PATH", $image_path);
    $check_button = Button_Check($module);
    $smarty->assign("CHECK", $check_button);
    $smarty->display("Qunfatmps/RelatedLists.tpl");
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:CallRelatedList.php

示例9: CRMSmarty

//Display the mail send status
$smarty = new CRMSmarty();
global $adb;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$record = $_REQUEST['record'];
if (!empty($record)) {
    $query = "select * from ec_smstc where id='" . $record . "' ";
    $row = $adb->getFirstLine($query);
    $num_rows = $adb->num_rows($row);
    if ($num_rows > 0) {
        $tc = $row['tc'];
        $price = $row['price'];
        $num = $row['num'];
    }
} else {
    $tc = '';
    $price = '';
    $num = '';
}
$smarty->assign("record", $record);
$smarty->assign("tc", $tc);
$smarty->assign("price", $price);
$smarty->assign("num", $num);
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("APP", $app_strings);
$smarty->assign("CMOD", $mod_strings);
$smarty->display("Settings/SmsTcManageEdit.tpl");
开发者ID:Pengzw,项目名称:c3crm,代码行数:30,代码来源:SmsTcManageEdit.php

示例10: getListViewHeader

//Retreive the List View Table Header
if ($viewid != '') {
    $url_string .= "&viewname=" . $viewid;
}
$listview_header = getListViewHeader($focus, "Memdays", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("LISTHEADER", $listview_header);
$listview_header_search = getSearchListHeaderValues($focus, "Memdays", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$listview_entries = getListViewEntries($focus, "Memdays", $list_result, $navigation_array, "", "", "EditView", "Delete", $oCustomView);
$smarty->assign("LISTENTITY", $listview_entries);
$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string, "Memdays", "index", $viewid);
//setup alphabetical search field
$alphabetical = AlphabeticalSearch($currentModule, 'index', 'memdayname', 'true', 'basic', "", "", "", "", $viewid, "", $alpbtselectedvalue);
$fieldnames = getAdvSearchfields($module);
$criteria = getcriteria_options();
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("ALPHABETICAL", $alphabetical);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("RECORD_COUNTS", $record_string);
//changed by dingjianting on 2007-3-1 for security view scope
$viewscope = get_viewscope($module);
$smarty->assign("VIEWSCOPE_OPTION", getViewScopeFilterHTML($module, $viewscope));
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$smarty->assign("ISADMIN", $current_user->is_admin);
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') {
    $smarty->display("ListViewEntries.tpl");
} else {
    $smarty->display("Memdays/ListView.tpl");
}
开发者ID:Pengzw,项目名称:c3crm,代码行数:31,代码来源:ListView.php

示例11: getProductCangkuSeccheck

for($i=0;$i<count($tax_details);$i++)
{
	$tax_details[$i]['percentage'] = getProductTaxPercentage($tax_details[$i]['taxname'],$focus->id);
}
$smarty->assign("TAX_DETAILS", $tax_details);
*/
$productcangkunums = array();
$productid = $focus->id;
//$sec_check=getProductCangkuSeccheck();
$tabid = getTabid("Products");
$data = getSplitDBValidationData($focus->tab_name, $tabid);
$smarty->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']);
//Security check for related list
$smarty->assign("MODULE", $currentModule);
if ($singlepane_view == 'true') {
    $related_array = getRelatedLists($currentModule, $focus);
    $smarty->assign("RELATEDLISTS", $related_array);
}
$smarty->assign("SinglePane_View", $singlepane_view);
$smarty->display("Products/DetailView.tpl");
function getProductCangkuSeccheck()
{
    global $adb;
    global $current_user;
    $userid = $current_user->id;
    $sec_check = " and ec_cangkus.cangkusid in (select ec_cangkuserrel.cangkusid from ec_cangkuserrel where ec_cangkuserrel.userid={$userid} ) ";
    return $sec_check;
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:30,代码来源:DetailView.php

示例12: getListViewHeader

    }
}
if ($start_rec == 0) {
    $limit_start_rec = 0;
} else {
    $limit_start_rec = $start_rec - 1;
}
$list_result = $adb->limitQuery2($query, $limit_start_rec, $list_max_entries_per_page, $query_order_by, $sorder);
$record_string = $app_strings["LBL_SHOWING"] . " " . $start_rec . " - " . $end_rec . " " . $app_strings["LBL_LIST_OF"] . " " . $noofrows;
//Retreive the List View Table Header
if ($viewid != '') {
    $url_string .= "&viewname=" . $viewid;
}
$listview_header = getListViewHeader($focus, "Qunfatmps", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("LISTHEADER", $listview_header);
$listview_header_search = getSearchListHeaderValues($focus, "Qunfatmps", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$listview_entries = getListViewEntries($focus, "Qunfatmps", $list_result, $navigation_array, "", "", "EditView", "Delete", $oCustomView);
$smarty->assign("LISTENTITY", $listview_entries);
$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string, "Qunfatmps", "index", $viewid);
$fieldnames = getAdvSearchfields($module);
$criteria = getcriteria_options();
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("RECORD_COUNTS", $record_string);
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') {
    $smarty->display("Qunfatmps/ListViewEntries.tpl");
} else {
    $smarty->display("Qunfatmps/ListView.tpl");
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:ListView.php

示例13: getTabid

}
if (isset($_REQUEST['return_viewname'])) {
    $smarty->assign("RETURN_VIEWNAME", $_REQUEST['return_viewname']);
}
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
//$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
$smarty->assign("ID", $focus->id);
$smarty->assign("OLD_ID", $old_id);
if (empty($focus->filename)) {
    $smarty->assign("FILENAME_TEXT", "");
    $smarty->assign("FILENAME", "");
} else {
    $smarty->assign("FILENAME_TEXT", "(" . $focus->filename . ")");
    $smarty->assign("FILENAME", $focus->filename);
}
/*
if (isset($focus->parent_type) && $focus->parent_type != "") {
        $change_parent_button = "<input title='".$app_strings['LBL_CHANGE_BUTTON_TITLE']."' accessKey='".$app_strings['LBL_CHANGE_BUTTON_KEY']."' ec_tabindex='3' type='button' class='button' value='".$app_strings['LBL_CHANGE_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='return window.open(\"index.php?module=\"+ document.EditView.parent_type.value + \"&action=Popup&html=Popup_picker&form=TasksEditView\",\"test\",\"width=600,height=400,resizable=1,scrollbars=1\");'>";
        $smarty->assign("CHANGE_PARENT_BUTTON", $change_parent_button);
}
if ($focus->parent_type == "Account") $smarty->assign("DEFAULT_SEARCH", "&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name));
*/
$tabid = getTabid("Notes");
$data = getSplitDBValidationData($focus->tab_name, $tabid);
$smarty->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']);
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
$smarty->display("Notes/NewCreateView.tpl");
开发者ID:ruckfull,项目名称:taobaocrm,代码行数:30,代码来源:NewEditView.php

示例14:

    $query = "select * from ec_appkey where id={$record}";
    $row = $adb->getFirstLine($query);
    if (!empty($row)) {
        $shopname = $row['shopname'];
        $appkey = $row['appkey'];
        $appsecret = $row['appsecret'];
        $nick = $row['nick'];
        $topsession = $row['topsession'];
        $status = $row['status'];
    }
    $mode = 'edit';
}
$smarty->assign("shopname", $shopname);
$smarty->assign("appkey", $appkey);
$smarty->assign("appsecret", $appsecret);
$smarty->assign("topsession", $topsession);
$smarty->assign("nick", $nick);
$smarty->assign("status", $status);
if ($mode == 'edit') {
    $edittype = "编辑";
} else {
    $edittype = "新增";
}
$smarty->assign("record", $record);
$smarty->assign("EDITTYPE", $edittype);
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("APP", $app_strings);
$smarty->assign("CMOD", $mod_strings);
$smarty->display("Relsettings/EditShopapp.tpl");
开发者ID:Pengzw,项目名称:c3crm,代码行数:30,代码来源:EditShopapp.php

示例15: array

$smarty->assign("success_product", $success_product);
$inventprofiedlarr = array("订单编号" => 'subject', "标题" => 'productname', "价格" => 'listprice', "购买数量" => 'quantity', "商品属性" => 'comment');
$inventprofiedlkeysarr = array_keys($inventprofiedlarr);
$success_inventproduct = 0;
$fail_inventproduct = 0;
$titlearr = array();
foreach ($rows2 as $key => $val) {
    if ($key > 0) {
        foreach ($val as $k => $v) {
            $title = trim($titlearr[$k]);
            if (in_array($title, $inventprofiedlkeysarr)) {
                $focus_imppro->column_fields[$inventprofiedlarr[$title]] = preg_replace('/\'/', '', $v);
            }
        }
        $return4 = $focus_imppro->saveInventPro();
        if ($return4 == '1') {
            $success_inventproduct++;
        } elseif ($return4 == '2') {
            $fail_inventproduct++;
        }
    } else {
        $titlearr = $val;
    }
}
$smarty->assign("success_inventproduct", $success_inventproduct);
$smarty->assign("fail_inventproduct", $fail_inventproduct);
//require_once ('getBuyNums.php');
$smarty->display("ImportStepXin2.tpl");
?>

开发者ID:Pengzw,项目名称:c3crm,代码行数:29,代码来源:ImportStepXin2.php


注:本文中的CRMSmarty::display方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。