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


PHP Document::get_id方法代码示例

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


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

示例1: foreach

 //
 if ($key == "documents") {
     echo "<hr />";
     echo "<div class='text documents'>";
     foreach ($val as $valkey => $valvalue) {
         $document_id = $valvalue;
         if (!is_numeric($document_id)) {
             continue;
         }
         $d = new Document($document_id);
         $fname = basename($d->get_url());
         $couch_docid = $d->get_couch_docid();
         $couch_revid = $d->get_couch_revid();
         $extension = substr($fname, strrpos($fname, "."));
         echo "<h1>" . xl('Document') . " '" . $fname . "'</h1>";
         $notes = Note::notes_factory($d->get_id());
         if (!empty($notes)) {
             echo "<table>";
         }
         foreach ($notes as $note) {
             echo '<tr>';
             echo '<td>' . xl('Note') . ' #' . $note->get_id() . '</td>';
             echo '</tr>';
             echo '<tr>';
             echo '<td>' . xl('Date') . ': ' . oeFormatShortDate($note->get_date()) . '</td>';
             echo '</tr>';
             echo '<tr>';
             echo '<td>' . $note->get_note() . '<br><br></td>';
             echo '</tr>';
         }
         if (!empty($notes)) {
开发者ID:ekuiperemr,项目名称:openemr,代码行数:31,代码来源:custom_report.php

示例2: CategoryTree

 function queue_action_process()
 {
     if ($_POST['process'] != "true") {
         return;
     }
     $messages = $this->_tpl_vars['messages'];
     //build a category tree so we can have a list of category ids that are valid
     $ct = new CategoryTree(1);
     $categories = $ct->_id_name;
     //see if there were and posted files and assign them
     $files = null;
     is_array($_POST['files']) ? $files = $_POST['files'] : ($files = array());
     //loop through posted files
     foreach ($files as $doc_id => $file) {
         //only operate on files checked as active
         if (!$file['active']) {
             continue;
         }
         //run basic validation checks
         if (!is_numeric($file['patient_id']) || !is_numeric($file['category_id']) || !is_numeric($doc_id)) {
             $messages .= "Error processing file '" . $file['name'] . "' the patient id must be a number and the category must exist.\n";
             continue;
         }
         //validate that the pod exists
         $d = new Document($doc_id);
         $sql = "SELECT pid from patient_data where pubpid = '" . $file['patient_id'] . "'";
         $result = $d->_db->Execute($sql);
         if (!$result || $result->EOF) {
             //patient id does not exist
             $messages .= "Error processing file '" . $file['name'] . " the specified patient id '" . $file['patient_id'] . "' could not be found.\n";
             continue;
         }
         //validate that the category id exists
         if (!isset($categories[$file['category_id']])) {
             $messages .= "Error processing file '" . $file['name'] . " the specified category with id '" . $file['category_id'] . "' could not be found.\n";
             continue;
         }
         //now do the work of moving the file
         $new_path = $this->_config['repository'] . $file['patient_id'] . "/";
         //see if the patient dir exists in the repository and create if not
         if (!file_exists($new_path)) {
             if (!mkdir($new_path, 0700)) {
                 $messages .= "The system was unable to create the directory for this upload, '" . $this->file_path . "'.\n";
                 continue;
             }
         }
         //fname is the name of the file after it is moved
         $fname = $file['name'];
         //see if patient autonumbering is used in this filename, if so strip out the autonumber part
         preg_match("/^([0-9]+)_/", basename($fname), $patient_match);
         if ($patient_match[1] == $file['patient_id']) {
             $fname = preg_replace("/^([0-9]+)_/", "", $fname);
         }
         //filenames should not have funny chars
         $fname = preg_replace("/[^a-zA-Z0-9_.]/", "_", $fname);
         //see if there is an existing file with the same name and rename as necessary
         if (file_exists($new_path . $file['name'])) {
             $messages .= "File with same name already exists at location: " . $new_path . "\n";
             $fname = basename($this->_rename_file($new_path . $file['name']));
             $messages .= "Current file name was changed to " . $fname . "\n";
         }
         //now move the file
         if (rename($this->_config['repository'] . $file['name'], $new_path . $fname)) {
             $messages .= "File " . $fname . " moved to patient id '" . $file['patient_id'] . "' and category '" . $categories[$file['category_id']]['name'] . "' successfully.\n";
             $d->url = "file://" . $new_path . $fname;
             $d->set_foreign_id($file['patient_id']);
             $d->set_mimetype($mimetype);
             $d->persist();
             $d->populate();
             if (is_numeric($d->get_id()) && is_numeric($file['category_id'])) {
                 $sql = "REPLACE INTO categories_to_documents set category_id = '" . $file['category_id'] . "', document_id = '" . $d->get_id() . "'";
                 $d->_db->Execute($sql);
             }
         } else {
             $error .= "The file could not be succesfully stored, this error is usually related to permissions problems on the storage system.\n";
         }
     }
     $this->assign("messages", $messages);
     $_POST['process'] = "";
 }
开发者ID:richsiy,项目名称:openemr,代码行数:80,代码来源:C_Document.class.php

示例3: foreach

 //
 if ($key == "documents") {
     echo "<hr />";
     echo "<div class='text documents'>";
     foreach ($val as $valkey => $valvalue) {
         $document_id = $valvalue;
         if (!is_numeric($document_id)) {
             continue;
         }
         $d = new Document($document_id);
         $fname = basename($d->get_url());
         $couch_docid = $d->get_couch_docid();
         $couch_revid = $d->get_couch_revid();
         echo "<h1>" . xl('Document') . " '" . $fname . "'</h1>";
         $n = new Note();
         $notes = $n->notes_factory($d->get_id());
         if (!empty($notes)) {
             echo "<table>";
         }
         foreach ($notes as $note) {
             echo '<tr>';
             echo '<td>' . xl('Note') . ' #' . $note->get_id() . '</td>';
             echo '</tr>';
             echo '<tr>';
             echo '<td>' . xl('Date') . ': ' . oeFormatShortDate($note->get_date()) . '</td>';
             echo '</tr>';
             echo '<tr>';
             echo '<td>' . $note->get_note() . '<br><br></td>';
             echo '</tr>';
         }
         if (!empty($notes)) {
开发者ID:juggernautsei,项目名称:openemr,代码行数:31,代码来源:custom_report.php

示例4: receive_hl7_results


//.........这里部分代码省略.........
                                            if ('OBX' == $a[0] && 'ORU' == $msgtype) {
                                                $tmp = explode($d2, $a[3]);
                                                $result_code = rhl7Text($tmp[0]);
                                                $result_text = rhl7Text($tmp[1]);
                                                // If this is a text result that duplicates the previous result except
                                                // for its value, then treat it as an extension of that result's value.
                                                $i = count($amain) - 1;
                                                $j = count($amain[$i]['res']) - 1;
                                                if ($j >= 0 && $context == 'OBX' && $a[2] == 'TX' && $amain[$i]['res'][$j]['result_data_type'] == 'L' && $amain[$i]['res'][$j]['result_code'] == $result_code && $amain[$i]['res'][$j]['date'] == rhl7DateTime($a[14]) && $amain[$i]['res'][$j]['facility'] == rhl7Text($a[15]) && $amain[$i]['res'][$j]['abnormal'] == rhl7Abnormal($a[8]) && $amain[$i]['res'][$j]['result_status'] == rhl7ReportStatus($a[11])) {
                                                    $amain[$i]['res'][$j]['comments'] = substr($amain[$i]['res'][$j]['comments'], 0, strlen($amain[$i]['res'][$j]['comments']) - 1) . '~' . rhl7Text($a[5]) . $commentdelim;
                                                    continue;
                                                }
                                                $context = $a[0];
                                                $ares = array();
                                                $ares['result_data_type'] = substr($a[2], 0, 1);
                                                // N, S, F or E
                                                $ares['comments'] = $commentdelim;
                                                if ($a[2] == 'ED') {
                                                    // This is the case of results as an embedded document. We will create
                                                    // a normal patient document in the assigned category for lab results.
                                                    $tmp = explode($d2, $a[5]);
                                                    $fileext = strtolower($tmp[0]);
                                                    $filename = date("Ymd_His") . '.' . $fileext;
                                                    $data = rhl7DecodeData($tmp[3], $tmp[4]);
                                                    if ($data === FALSE) {
                                                        return rhl7LogMsg(xl('Invalid encapsulated data encoding type') . ': ' . $tmp[3]);
                                                    }
                                                    if (!$dryrun) {
                                                        $d = new Document();
                                                        $rc = $d->createDocument($porow['patient_id'], $results_category_id, $filename, rhl7MimeType($fileext), $data);
                                                        if ($rc) {
                                                            return rhl7LogMsg($rc);
                                                        }
                                                        $ares['document_id'] = $d->get_id();
                                                    }
                                                } else {
                                                    if ($a[2] == 'CWE') {
                                                        $ares['result'] = rhl7CWE($a[5], $d2);
                                                    } else {
                                                        if ($a[2] == 'SN') {
                                                            $ares['result'] = trim(str_replace($d2, ' ', $a[5]));
                                                        } else {
                                                            if ($a[2] == 'TX' || strlen($a[5]) > 200) {
                                                                // OBX-5 can be a very long string of text with "~" as line separators.
                                                                // The first line of comments is reserved for such things.
                                                                $ares['result_data_type'] = 'L';
                                                                $ares['result'] = '';
                                                                $ares['comments'] = rhl7Text($a[5]) . $commentdelim;
                                                            } else {
                                                                $ares['result'] = rhl7Text($a[5]);
                                                            }
                                                        }
                                                    }
                                                }
                                                $ares['result_code'] = $result_code;
                                                $ares['result_text'] = $result_text;
                                                $ares['date'] = rhl7DateTime($a[14]);
                                                $ares['facility'] = rhl7Text($a[15]);
                                                // Ensoftek: Units may have mutiple segments(as seen in MU2 samples), parse and take just first segment.
                                                $tmp = explode($d2, $a[6]);
                                                $ares['units'] = rhl7Text($tmp[0]);
                                                $ares['range'] = rhl7Text($a[7]);
                                                $ares['abnormal'] = rhl7Abnormal($a[8]);
                                                // values are lab dependent
                                                $ares['result_status'] = rhl7ReportStatus($a[11]);
                                                // Ensoftek: Performing Organization Details. Goes into "Pending Review/Patient Results--->Notes--->Facility" section.
开发者ID:mi-squared,项目名称:openemr,代码行数:67,代码来源:receive_hl7_results.inc.php

示例5: sqlStatement

<?php 
    if ($noteid) {
        // Get the related document IDs if any.
        $tmp = sqlStatement("SELECT id1 FROM gprelations WHERE " . "type1 = ? AND type2 = ? AND id2 = ?", array('1', '6', $noteid));
        if (sqlNumRows($tmp)) {
            echo " <tr>\n";
            echo "  <td class='text'><b>";
            echo xlt('Linked document') . ":</b>\n";
            while ($gprow = sqlFetchArray($tmp)) {
                $d = new Document($gprow['id1']);
                $enc_list = sqlStatement("SELECT fe.encounter,fe.date,openemr_postcalendar_categories.pc_catname FROM form_encounter AS fe " . " left join openemr_postcalendar_categories on fe.pc_catid=openemr_postcalendar_categories.pc_catid  WHERE fe.pid = ? order by fe.date desc", array($prow['pid']));
                $str_dob = htmlspecialchars(xl("DOB") . ":" . $prow['DOB'] . " " . xl("Age") . ":" . getPatientAge($prow['DOB']));
                $pname = $prow['fname'] . " " . $prow['lname'];
                echo "<a href='javascript:void(0);' ";
                echo "onClick=\"gotoReport(" . addslashes(attr($d->get_id())) . ",'" . addslashes(attr($pname)) . "'," . addslashes(attr($prow['pid'])) . "," . addslashes(attr($prow['pubpid'])) . ",'" . addslashes(attr($str_dob)) . "');\">";
                echo text($d->get_url_file());
                echo "</a>\n";
            }
            echo "  </td>\n";
            echo " </tr>\n";
        }
        // Get the related procedure order IDs if any.
        $tmp = sqlStatement("SELECT id1 FROM gprelations WHERE " . "type1 = ? AND type2 = ? AND id2 = ?", array('2', '6', $noteid));
        if (sqlNumRows($tmp)) {
            echo " <tr>\n";
            echo "  <td class='text'><b>";
            echo xlt('Linked procedure order') . ":</b>\n";
            while ($gprow = sqlFetchArray($tmp)) {
                echo "   <a href='";
                echo $GLOBALS['webroot'] . "/interface/orders/single_order_results.php?orderid=";
开发者ID:juggernautsei,项目名称:openemr,代码行数:30,代码来源:messages.php

示例6: sqlStatement

 </tr>

<?php 
    if ($noteid) {
        // Get the related document IDs if any.
        $tmp = sqlStatement("SELECT id1 FROM gprelations WHERE " . "type1 = ? AND type2 = ? AND id2 = ?", array('1', '6', $noteid));
        if (sqlNumRows($tmp)) {
            echo " <tr>\n";
            echo "  <td class='text'><b>";
            echo xlt('Linked document') . ":</b>\n";
            while ($gprow = sqlFetchArray($tmp)) {
                $d = new Document($gprow['id1']);
                echo "   <a href='";
                echo $GLOBALS['webroot'] . "/controller.php?document&retrieve";
                echo "&patient_id=" . $d->get_foreign_id();
                echo "&document_id=" . $d->get_id();
                echo "&as_file=true' target='_blank' onclick='top.restoreSession()'>";
                echo text($d->get_url_file());
                echo "</a>\n";
            }
            echo "  </td>\n";
            echo " </tr>\n";
        }
        // Get the related procedure order IDs if any.
        $tmp = sqlStatement("SELECT id1 FROM gprelations WHERE " . "type1 = ? AND type2 = ? AND id2 = ?", array('2', '6', $noteid));
        if (sqlNumRows($tmp)) {
            echo " <tr>\n";
            echo "  <td class='text'><b>";
            echo xlt('Linked procedure order') . ":</b>\n";
            while ($gprow = sqlFetchArray($tmp)) {
                echo "   <a href='";
开发者ID:mi-squared,项目名称:openemr,代码行数:31,代码来源:messages.php

示例7: receive_hl7_results


//.........这里部分代码省略.........
                                } else {
                                    if ($a[0] == 'OBX') {
                                        $context = $a[0];
                                        if (!$dryrun) {
                                            rhl7FlushResult($ares);
                                        }
                                        $ares = array();
                                        if (!$procedure_report_id) {
                                            if (!$dryrun) {
                                                $procedure_report_id = rhl7FlushReport($arep);
                                            }
                                            $arep = array();
                                        }
                                        $ares['procedure_report_id'] = $procedure_report_id;
                                        $ares['result_data_type'] = substr($a[2], 0, 1);
                                        // N, S, F or E
                                        $ares['comments'] = $commentdelim;
                                        if ($a[2] == 'ED') {
                                            // This is the case of results as an embedded document. We will create
                                            // a normal patient document in the assigned category for lab results.
                                            $tmp = explode($d2, $a[5]);
                                            $fileext = strtolower($tmp[0]);
                                            $filename = date("Ymd_His") . '.' . $fileext;
                                            $data = rhl7DecodeData($tmp[3], $tmp[4]);
                                            if ($data === FALSE) {
                                                return rhl7LogMsg(xl('Invalid encapsulated data encoding type') . ': ' . $tmp[3]);
                                            }
                                            if (!$dryrun) {
                                                $d = new Document();
                                                $rc = $d->createDocument($porow['patient_id'], $results_category_id, $filename, rhl7MimeType($fileext), $data);
                                                if ($rc) {
                                                    return rhl7LogMsg($rc);
                                                }
                                                $ares['document_id'] = $d->get_id();
                                            }
                                        } else {
                                            if (strlen($a[5]) > 200) {
                                                // OBX-5 can be a very long string of text with "~" as line separators.
                                                // The first line of comments is reserved for such things.
                                                $ares['result_data_type'] = 'L';
                                                $ares['result'] = '';
                                                $ares['comments'] = rhl7Text($a[5]) . $commentdelim;
                                            } else {
                                                $ares['result'] = rhl7Text($a[5]);
                                            }
                                        }
                                        $tmp = explode($d2, $a[3]);
                                        $ares['result_code'] = rhl7Text($tmp[0]);
                                        $ares['result_text'] = rhl7Text($tmp[1]);
                                        $ares['date'] = rhl7DateTime($a[14]);
                                        $ares['facility'] = rhl7Text($a[15]);
                                        $ares['units'] = rhl7Text($a[6]);
                                        $ares['range'] = rhl7Text($a[7]);
                                        $ares['abnormal'] = rhl7Abnormal($a[8]);
                                        // values are lab dependent
                                        $ares['result_status'] = rhl7ReportStatus($a[11]);
                                    } else {
                                        if ($a[0] == 'ZEF') {
                                            // ZEF segment is treated like an OBX with an embedded Base64-encoded PDF.
                                            $context = 'OBX';
                                            if (!$dryrun) {
                                                rhl7FlushResult($ares);
                                            }
                                            $ares = array();
                                            if (!$procedure_report_id) {
                                                if (!$dryrun) {
开发者ID:jatin-52,项目名称:erm,代码行数:67,代码来源:receive_hl7_results.inc.php

示例8: display_draw_image

function display_draw_image($zone, $encounter, $pid)
{
    global $form_folder;
    global $web_root;
    global $PDF_OUTPUT;
    $side = "OU";
    $base_name = $pid . "_" . $encounter . "_" . $side . "_" . $zone . "_VIEW";
    $filename = $base_name . ".jpg";
    $sql = "SELECT * from documents where documents.url like '%" . $filename . "'";
    $doc = sqlQuery($sql);
    $document_id = $doc['id'];
    if ($document_id > '1' && is_numeric($document_id)) {
        $d = new Document($document_id);
        $fname = basename($d->get_url());
        $couch_docid = $d->get_couch_docid();
        $couch_revid = $d->get_couch_revid();
        $extension = substr($fname, strrpos($fname, "."));
        $notes = Note::notes_factory($d->get_id());
        if (!empty($notes)) {
            echo "<table>";
        }
        foreach ($notes as $note) {
            echo '<tr>';
            echo '<td>' . xlt('Note') . ' #' . $note->get_id() . '</td>';
            echo '</tr>';
            echo '<tr>';
            echo '<td>' . xlt('Date') . ': ' . oeFormatShortDate($note->get_date()) . '</td>';
            echo '</tr>';
            echo '<tr>';
            echo '<td>' . $note->get_note() . '<br /><br /></td>';
            echo '</tr>';
        }
        if (!empty($notes)) {
            echo "</table>";
        }
        $url_file = $d->get_url_filepath();
        if ($couch_docid && $couch_revid) {
            $url_file = $d->get_couch_url($pid, $encounter);
        }
        // Collect filename and path
        $from_all = explode("/", $url_file);
        $from_filename = array_pop($from_all);
        $from_pathname_array = array();
        for ($i = 0; $i < $d->get_path_depth(); $i++) {
            $from_pathname_array[] = array_pop($from_all);
        }
        $from_pathname_array = array_reverse($from_pathname_array);
        $from_pathname = implode("/", $from_pathname_array);
        if ($couch_docid && $couch_revid) {
            $from_file = $GLOBALS['OE_SITE_DIR'] . '/documents/temp/' . $from_filename;
            $to_file = substr($from_file, 0, strrpos($from_file, '.')) . '_converted.jpg';
        } else {
            $from_file = $GLOBALS["fileroot"] . "/sites/" . $_SESSION['site_id'] . '/documents/' . $from_pathname . '/' . $from_filename;
            $to_file = substr($from_file, 0, strrpos($from_file, '.')) . '_converted.jpg';
        }
        //               if ($extension == ".png" || $extension == ".jpg" || $extension == ".jpeg" || $extension == ".gif") {
        if ($PDF_OUTPUT) {
            echo "<img src='" . $from_file . "' style='width:220px;height:120px;'>";
        } else {
            $filetoshow = $GLOBALS['webroot'] . "/controller.php?document&retrieve&patient_id={$pid}&document_id=" . $doc['id'] . "&as_file=false&blahblah=" . rand();
            echo "<img src='" . $filetoshow . "' style='width:220px;height:120px;'>";
        }
    } else {
        $filetoshow = "../../forms/" . $form_folder . "/images/" . $side . "_" . $zone . "_BASE.jpg";
        if ($PDF_OUTPUT) {
            $filetoshow = $GLOBALS["webroot"] . "/interface/forms/" . $form_folder . "/images/" . $side . "_" . $zone . "_BASE.jpg";
        }
        // uncomment to show base image, no touch up by user.
        // echo "<img src='". $filetoshow."' style='width:220px;height:120px;'>";
    }
    return;
}
开发者ID:bradymiller,项目名称:openemr,代码行数:72,代码来源:report.php

示例9: receive_hl7_results


//.........这里部分代码省略.........
                                $arep['report_status'] = $in_report_status;
                                $arep['report_notes'] = '';
                            } else {
                                if ($a[0] == 'NTE' && $context == 'OBR') {
                                    $arep['report_notes'] .= rhl7Text($a[3]) . "\n";
                                } else {
                                    if ($a[0] == 'OBX') {
                                        $context = $a[0];
                                        rhl7FlushResult($ares);
                                        if (!$procedure_report_id) {
                                            $procedure_report_id = rhl7FlushReport($arep);
                                        }
                                        $ares = array();
                                        $ares['procedure_report_id'] = $procedure_report_id;
                                        $ares['result_data_type'] = substr($a[2], 0, 1);
                                        // N, S, F or E
                                        $ares['comments'] = $commentdelim;
                                        if ($a[2] == 'ED') {
                                            // This is the case of results as an embedded document. We will create
                                            // a normal patient document in the assigned category for lab results.
                                            $tmp = explode($d2, $a[5]);
                                            $fileext = strtolower($tmp[0]);
                                            $filename = date("Ymd_His") . '.' . $fileext;
                                            $data = rhl7DecodeData($tmp[3], &$tmp[4]);
                                            if ($data === FALSE) {
                                                return xl('Invalid encapsulated data encoding type') . ': ' . $tmp[3];
                                            }
                                            $d = new Document();
                                            $rc = $d->createDocument($porow['patient_id'], $results_category_id, $filename, rhl7MimeType($fileext), $data);
                                            if ($rc) {
                                                return $rc;
                                            }
                                            // This would be error message text.
                                            $ares['document_id'] = $d->get_id();
                                        } else {
                                            if (strlen($a[5]) > 200) {
                                                // OBX-5 can be a very long string of text with "~" as line separators.
                                                // The first line of comments is reserved for such things.
                                                $ares['result_data_type'] = 'L';
                                                $ares['result'] = '';
                                                $ares['comments'] = rhl7Text($a[5]) . $commentdelim;
                                            } else {
                                                $ares['result'] = rhl7Text($a[5]);
                                            }
                                        }
                                        $tmp = explode($d2, $a[3]);
                                        $ares['result_code'] = rhl7Text($tmp[0]);
                                        $ares['result_text'] = rhl7Text($tmp[1]);
                                        $ares['date'] = rhl7DateTime($a[14]);
                                        $ares['facility'] = rhl7Text($a[15]);
                                        $ares['units'] = rhl7Text($a[6]);
                                        $ares['range'] = rhl7Text($a[7]);
                                        $ares['abnormal'] = rhl7Abnormal($a[8]);
                                        // values are lab dependent
                                        $ares['result_status'] = rhl7ReportStatus($a[11]);
                                    } else {
                                        if ($a[0] == 'ZEF') {
                                            // ZEF segment is treated like an OBX with an embedded Base64-encoded PDF.
                                            $context = 'OBX';
                                            rhl7FlushResult($ares);
                                            if (!$procedure_report_id) {
                                                $procedure_report_id = rhl7FlushReport($arep);
                                            }
                                            $ares = array();
                                            $ares['procedure_report_id'] = $procedure_report_id;
                                            $ares['result_data_type'] = 'E';
开发者ID:mindfeederllc,项目名称:openemr,代码行数:67,代码来源:receive_hl7_results.inc.php


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