• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Codes类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: makeCode

 public static function makeCode($data)
 {
     $codes = new Codes();
     foreach ($data as $key => $value) {
         $codes->{$key} = $value;
     }
     $codes->save();
     return 1;
 }
开发者ID:enakee,项目名称:lv-mlm-system,代码行数:9,代码来源:Codes.php


示例2: use_buycodes

 function use_buycodes()
 {
     Load::model('codes');
     Load::model('transaction');
     $Codes = new Codes();
     $Transaction = new Transaction();
     if ($_POST['source'] == "Commission Deduction") {
         $Transaction->add_buycodes($_POST['amount']);
         $Codes->add($_POST['howmany'], $_POST['acc_type']);
     } else {
         $Transaction->add_buycodes_request($_POST['howmany'], $_POST['acc_type'], $_POST['amount']);
     }
     echo 1;
     exit;
 }
开发者ID:etuyco,项目名称:v2.inlight-marketing,代码行数:15,代码来源:ewallet.php


示例3: render

 public function render($matches)
 {
     $text = '';
     list($variant, $data) = $matches;
     $text = self::render_chart(Codes::fix_tags($data), $variant);
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:7,代码来源:code_chart.php


示例4: doPatientCheck

 public function doPatientCheck(RsPatient $patient, $beginDate = null, $endDate = null, $options = null)
 {
     $data = Codes::lookup($this->getOptionId());
     $range = new Range(Range::NEG_INF, Range::POS_INF);
     if (isset($options[self::OPTION_RANGE]) && is_a($options[self::OPTION_RANGE], 'Range')) {
         $range = $options[self::OPTION_RANGE];
     }
     foreach ($data as $codeType => $codes) {
         foreach ($codes as $code) {
             // search through vitals to find the most recent lab result in the date range
             // if the result value is within range using Range->test(val), return true
             $sql = "SELECT procedure_result.result, procedure_result.date " . "FROM `procedure_type`, " . "`procedure_order`, " . "`procedure_report`, " . "`procedure_result` " . "WHERE procedure_type.procedure_type_id = procedure_order.procedure_type_id " . "AND procedure_order.procedure_order_id = procedure_report.procedure_order_id " . "AND procedure_report.procedure_report_id = procedure_result.procedure_report_id " . "AND ( procedure_type.standard_code = ? OR procedure_type.procedure_code = ? ) " . "AND procedure_report.date_collected >= ?  " . "AND procedure_report.date_collected <= ?  " . "AND procedure_order.patient_id = ? ";
             if ($range->lowerBound != Range::NEG_INF) {
                 $sql .= "AND procedure_result.result >= ? ";
             }
             if ($range->upperBound != Range::POS_INF) {
                 $sql .= "AND procedure_result.result < ? ";
             }
             $bindings = array($codeType . ':' . $code, $code, $beginDate, $endDate, $patient->id);
             if ($range->lowerBound != Range::NEG_INF) {
                 $bindings[] = $range->lowerBound;
             }
             if ($range->upperBound != Range::POS_INF) {
                 $bindings[] = $range->upperBound;
             }
             $result = sqlStatement($sql, $bindings);
             $number = sqlNumRows($result);
             if ($number > 0) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:stephen-smith,项目名称:openemr,代码行数:34,代码来源:LabResult.php


示例5: doPatientCheck

 public function doPatientCheck(RsPatient $patient, $beginDate = null, $endDate = null, $options = null)
 {
     $return = false;
     $listOptions = Codes::lookup($this->getOptionId(), 'CVX');
     if (count($listOptions) > 0) {
         $sqlQueryBind = array();
         $query = "SELECT * " . "FROM immunizations " . "WHERE patient_id = ? AND added_erroneously = '0' " . "AND administered_date >= ? " . "AND administered_date <= ? ";
         $query .= "AND ( ";
         $count = 0;
         array_push($sqlQueryBind, $patient->id, $beginDate, $endDate);
         foreach ($listOptions as $option_id) {
             $query .= "cvx_code = ? ";
             $count++;
             if ($count < count($listOptions)) {
                 $query .= "OR ";
             }
             array_push($sqlQueryBind, $option_id);
         }
         $query .= " ) ";
         $result = sqlStatement($query, $sqlQueryBind);
         $rows = array();
         for ($iter = 0; $row = sqlFetchArray($result); $iter++) {
             $rows[$iter] = $row;
         }
         if (isset($options[self::OPTION_COUNT]) && count($rows) >= $options[self::OPTION_COUNT]) {
             $return = true;
         } else {
             if (!isset($options[self::OPTION_COUNT]) && count($rows) > 0) {
                 $return = true;
             }
         }
     }
     return $return;
 }
开发者ID:mi-squared,项目名称:openemr,代码行数:34,代码来源:Medication.php


示例6: layout

 /**
  * list users
  *
  * @param resource the SQL result
  * @return string the rendered text
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // empty list
     if (!SQL::count($result)) {
         $output = array();
         return $output;
     }
     // we return an array of ($url => $attributes)
     $items = array();
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // we need some address
         if (!$item['email']) {
             continue;
         }
         // do not write to myself
         // 			if($item['id'] == Surfer::get_id())
         // 				continue;
         $label = ucfirst(trim(Codes::beautify(strip_tags($item['full_name'], '<br><div><img><p><span>'))));
         if (!$label) {
             $label = ucfirst($item['nick_name']);
         }
         // one entry per address
         $items[trim($item['email'])] = $label;
     }
     // end of processing
     SQL::free($result);
     return $items;
 }
开发者ID:rair,项目名称:yacs,代码行数:38,代码来源:layout_users_as_address.php


示例7: layout

 /**
  * list articles
  *
  * @param resource the SQL result
  * @return string the rendered text
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // we return some text
     $text = '';
     // empty list
     if (!SQL::count($result)) {
         return $text;
     }
     // clear flows
     $text .= '<br style="clear: left" />';
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // get the related overlay
         $overlay = Overlay::load($item, 'article:' . $item['id']);
         // the url to view this item
         $url = Articles::get_permalink($item);
         // use the title to label the link
         if (is_object($overlay)) {
             $title = Codes::beautify_title($overlay->get_text('title', $item));
         } else {
             $title = Codes::beautify_title($item['title']);
         }
         // the hovering title
         if ($item['introduction'] && $context['skins_with_details'] == 'Y') {
             $hover = strip_tags(Codes::beautify_introduction($item['introduction']));
         } else {
             $hover = i18n::s('View the page');
         }
         // title is a link to the target article
         $title =& Skin::build_link($url, $title, 'basic', $hover);
         // use the thumbnail for this article
         if ($icon = trim($item['thumbnail_url'])) {
             // fix relative path
             if (!preg_match('/^(\\/|http:|https:|ftp:)/', $icon)) {
                 $icon = $context['url_to_root'] . $icon;
             }
             // use parameter of the control panel for this one
             $options = '';
             if (isset($context['classes_for_thumbnail_images'])) {
                 $options = 'class="' . $context['classes_for_thumbnail_images'] . '" ';
             }
             // build the complete HTML element
             $icon = '<img src="' . $icon . '" alt="" title="' . encode_field($hover) . '" ' . $options . ' />';
             // use default icon if nothing to display
         } else {
             $icon = MAP_IMG;
         }
         // use the image as a link to the target page
         $icon =& Skin::build_link($url, $icon, 'basic', $hover);
         // add a floating box
         $text .= Skin::build_box($title, $icon, 'floating');
     }
     // clear flows
     $text .= '<br style="clear: left" />';
     // end of processing
     SQL::free($result);
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:67,代码来源:layout_articles_as_titles.php


示例8: layout

 /**
  * list images
  *
  * @param resource the SQL result
  * @return string the rendered text
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // empty list
     if (!SQL::count($result)) {
         $output = array();
         return $output;
     }
     // we return an array of ($url => $attributes)
     $items = array();
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // get the anchor for this image
         if ($item['anchor']) {
             $anchor = Anchors::get($item['anchor']);
         }
         // url to view the image
         $url = $context['url_to_home'] . $context['url_to_root'] . Images::get_url($item['id']);
         // time of last update
         $time = SQL::strtotime($item['edit_date']);
         // the title as the label
         if ($item['title']) {
             $label = ucfirst($item['title']) . ' (' . $item['image_name'] . ')';
         } else {
             $label = $item['image_name'];
         }
         // the section
         $section = '';
         if (is_object($anchor)) {
             $section = ucfirst($anchor->get_title());
         }
         // the author(s) is an e-mail address, according to rss 2.0 spec
         $author = $item['create_address'] . ' (' . $item['create_name'] . ')';
         if ($item['create_address'] != $item['edit_address']) {
             if ($author) {
                 $author .= ', ';
             }
             $author .= $item['edit_address'] . ' (' . $item['edit_name'] . ')';
         }
         // the description
         $description = Codes::beautify($item['description']);
         // cap the number of words
         $description = Skin::cap($description, 300);
         // fix image references
         $description = preg_replace('#"/([^">]+?)"#', '"' . $context['url_to_home'] . '/$1"', $description);
         $introduction = $description;
         // other rss fields
         $extensions = array();
         // url for enclosure
         $type = Files::get_mime_type($item['image_name']);
         $extensions[] = '<enclosure url="' . $context['url_to_home'] . $context['url_to_root'] . Files::get_path($item['anchor'], 'images') . '/' . $item['image_name'] . '"' . ' length="' . $item['image_size'] . '"' . ' type="' . $type . '" />';
         // list all components for this item
         $items[$url] = array($time, $label, $author, $section, NULL, $introduction, $description, $extensions);
     }
     // end of processing
     SQL::free($result);
     return $items;
 }
开发者ID:rair,项目名称:yacs,代码行数:66,代码来源:layout_images_as_feed.php


示例9: layout

 /**
  * list comments as successive notes in a thread
  *
  * @param resource the SQL result
  * @return string the rendered text
  **/
 function layout($result)
 {
     global $context;
     // we return formatted text
     $text = '';
     // empty list
     if (!SQL::count($result)) {
         return $text;
     }
     // build a list of comments
     while ($item = SQL::fetch($result)) {
         // automatic notification
         if ($item['type'] == 'notification') {
             $text = '<dd class="thread_other" style="font-style: italic;">' . ucfirst(trim($item['description'])) . '</dd>' . $text;
         } else {
             // link to user profile -- open links in separate window to enable side browsing of participant profiles
             if ($item['create_id']) {
                 if ($user = Users::get($item['create_id']) && $user['full_name']) {
                     $hover = $user['full_name'];
                 } else {
                     $hover = NULL;
                 }
                 $author = Users::get_link($item['create_name'], $item['create_address'], $item['create_id'], TRUE, $hover);
             } else {
                 $author = Users::get_link($item['edit_name'], $item['edit_address'], $item['edit_id'], TRUE);
             }
             // differentiate my posts from others
             if (Surfer::get_id() && $item['create_id'] == Surfer::get_id()) {
                 $style = ' class="thread_me"';
             } else {
                 $style = ' class="thread_other"';
             }
             // a clickable label
             $stamp = '#';
             // flag old items on same day
             if (!strncmp($item['edit_date'], gmstrftime('%Y-%m-%d %H:%M:%S', time()), 10)) {
                 $stamp = Skin::build_time($item['edit_date']);
             } else {
                 $stamp = Skin::build_date($item['edit_date']);
             }
             // append this at the end of the comment
             $stamp = ' <div style="float: right; font-size: x-small">' . Skin::build_link(Comments::get_url($item['id']), $stamp, 'basic', i18n::s('Edit')) . '</div>';
             // package everything --change order to get oldest first
             $text = '<dt' . $style . '>' . $author . '</dt><dd' . $style . '>' . $stamp . ucfirst(trim($item['description'])) . '</dd>' . $text;
         }
     }
     // end of processing
     SQL::free($result);
     // finalize the returned definition list
     if ($text) {
         $text = '<dl>' . $text . '</dl>';
     }
     // process yacs codes
     $text = Codes::beautify($text);
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:62,代码来源:layout_comments_as_thread.php


示例10: generateCode

 public function generateCode()
 {
     $data = array();
     $result = 0;
     $count = $_POST['count'];
     for ($i = 0; $i < $count; $i++) {
         $data['activationcode'] = Crypt::encrypt(str_random(20));
         $data['membertype'] = $_POST['membertype'];
         $result = $result + Codes::makeCode($data);
     }
     return $result . " activation codes added.";
 }
开发者ID:enakee,项目名称:lv-mlm-system,代码行数:12,代码来源:CodesController.php


示例11: layout

 /**
  * list dates
  *
  * @param resource the SQL result
  * @return string the rendered text
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // build the calendar
     $text = 'BEGIN:VCALENDAR' . CRLF . 'VERSION:2.0' . CRLF . 'PRODID:YACS' . CRLF . 'METHOD:PUBLISH' . CRLF;
     // organization, if any
     if (isset($context['site_name']) && $context['site_name']) {
         $text .= 'X-WR-CALNAME:' . $context['site_name'] . CRLF;
     }
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // one event at a time
         $text .= 'BEGIN:VEVENT' . CRLF;
         // the event spans limited time
         if (isset($item['duration']) && $item['duration']) {
             $text .= 'DTSTART:' . gmdate('Ymd\\THis\\Z', SQL::strtotime($item['date_stamp'])) . CRLF;
             $text .= 'DTEND:' . gmdate('Ymd\\THis\\Z', SQL::strtotime($item['date_stamp']) + $item['duration'] * 60) . CRLF;
             // a full-day event
         } else {
             $text .= 'DTSTART;VALUE=DATE:' . date('Ymd', SQL::strtotime($item['date_stamp'])) . CRLF;
             $text .= 'DTEND;VALUE=DATE:' . date('Ymd', SQL::strtotime($item['date_stamp']) + 86400) . CRLF;
         }
         // url to view the date
         $text .= 'URL:' . Articles::get_permalink($item) . CRLF;
         // organization, if any
         if (isset($item['introduction']) && $item['introduction']) {
             $text .= 'DESCRIPTION:' . str_replace(array("\n", "\r"), ' ', strip_tags($item['introduction'])) . CRLF;
         }
         // build a valid title
         if (isset($item['title']) && $item['title']) {
             $text .= 'SUMMARY:' . Codes::beautify_title($item['title']) . CRLF;
         }
         // required by Outlook 2003
         if (isset($item['id']) && $item['id']) {
             $text .= 'UID:' . $item['id'] . CRLF;
         }
         // date of creation
         if (isset($item['create_date']) && $item['create_date']) {
             $text .= 'CREATED:' . gmdate('Ymd\\THis\\Z', SQL::strtotime($item['create_date'])) . CRLF;
         }
         // date of last modification
         if (isset($item['edit_date']) && $item['edit_date']) {
             $text .= 'DTSTAMP:' . gmdate('Ymd\\THis\\Z', SQL::strtotime($item['edit_date'])) . CRLF;
         }
         // next event
         $text .= 'SEQUENCE:0' . CRLF . 'END:VEVENT' . CRLF;
     }
     // date of last update
     $text .= 'END:VCALENDAR' . CRLF;
     // end of processing
     SQL::free($result);
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:61,代码来源:layout_dates_as_ics.php


示例12: testPrepareCodes

 public function testPrepareCodes()
 {
     $C = new Codes();
     $C->format = "ABC******";
     // 9 characters + ',' will be 10 chars
     $C->prefix = $C->setPrefix($C->format);
     $C->num_random_chars = strlen($C->format) - strlen($C->prefix);
     $C->fieldlength = 100;
     // sets fieldlength artifically low just for test usually 32768
     $num_codes = 101;
     $codes = $C->generateMany($num_codes);
     $code_length = strlen($codes[0]);
     $prep = $C->prepareCodesForInsert($codes);
     $c = ceil($num_codes * ($code_length + 1) / $C->fieldlength);
     //  	 echo "\n | first code : $codes[0] ";
     //  	 echo " | num_codes : $num_codes ";
     //  	 echo " | code_length : $code_length \n";
     print_r($prep);
     // we expect the number of strings of codes to be 11
     $this->assertTrue(count($prep) == $c);
 }
开发者ID:nelsonic,项目名称:evc,代码行数:21,代码来源:Test.php


示例13: doPatientCheck

 public function doPatientCheck(RsPatient $patient, $beginDate = null, $endDate = null, $options = null)
 {
     $data = Codes::lookup($this->getOptionId());
     $type = $this->getListType();
     foreach ($data as $codeType => $codes) {
         foreach ($codes as $code) {
             if (exist_lists_item($patient->id, $type, $codeType . '::' . $code, $endDate)) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:mi-squared,项目名称:openemr,代码行数:13,代码来源:Diagnosis.php


示例14: test

 public function test(CqmPatient $patient, $beginDate, $endDate)
 {
     //Group A Streptococcus Test Array
     $strep_test_code = "'" . implode("','", Codes::lookup(LabResult::STREPTOCOCCUS_TEST, 'LOINC')) . "'";
     //Patients who were tested for Streptococcus A during the same encounter that the antibiotic was prescribed, Encounter category should be office visit.
     $query = "SELECT count(*) as cnt FROM form_encounter fe " . "INNER JOIN openemr_postcalendar_categories opc ON fe.pc_catid = opc.pc_catid " . "INNER JOIN procedure_order po ON po.encounter_id = fe.encounter " . "INNER JOIN procedure_order_code pc ON po.procedure_order_id = pc.procedure_order_id " . "INNER JOIN procedure_report pr on pr.procedure_order_id = po.procedure_order_id " . "INNER JOIN procedure_result pres on pres.procedure_report_id = pr.procedure_report_id " . "WHERE opc.pc_catname = 'Office Visit' AND fe.pid = ? AND (fe.date BETWEEN ? AND  ? ) " . " AND pres.result_code in ({$strep_test_code}) AND ( DATEDIFF(po.date_ordered,fe.date) between 0 and 3 or DATEDIFF(fe.date,po.date_ordered) between 0 and 3)";
     $check = sqlQuery($query, array($patient->id, $beginDate, $endDate));
     if ($check['cnt'] > 0) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:mi-squared,项目名称:openemr,代码行数:13,代码来源:Numerator.php


示例15: configure

 public function configure()
 {
     $this->widgetSchema['category'] = new sfWidgetFormChoice(array('choices' => Codes::getCategories()));
     $this->validatorSchema['category'] = new sfValidatorChoice(array('required' => false, 'choices' => array_keys(Codes::getCategories())));
     $this->widgetSchema['referenced_relation'] = new sfWidgetFormChoice(array('choices' => array('specimens' => 'Specimen Code', 'specimen_parts' => 'Parts Code')));
     $this->validatorSchema['referenced_relation'] = new sfValidatorChoice(array('required' => false, 'choices' => array('specimens' => 'specimens', 'specimen_parts' => 'specimen_parts')));
     $this->widgetSchema['code_part'] = new sfWidgetFormInput(array(), array('style' => 'width:97%;'));
     $this->widgetSchema['code_from'] = new sfWidgetFormInput(array(), array('class' => 'lsmall_size'));
     $this->widgetSchema['code_to'] = new sfWidgetFormInput(array(), array('class' => 'lsmall_size'));
     $this->validatorSchema['code_part'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->validatorSchema['code_from'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->validatorSchema['code_to'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->mergePostValidator(new CodesLineValidatorSchema());
 }
开发者ID:naturalsciences,项目名称:Darwin,代码行数:14,代码来源:CodeLineForm.class.php


示例16: layout

 /**
  * list files
  *
  * @param resource the SQL result
  * @return array of resulting items, or NULL
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // we return an array of ($url => $attributes)
     $items = array();
     // empty list
     if (!SQL::count($result)) {
         return $items;
     }
     // sanity check
     if (!isset($this->layout_variant)) {
         $this->layout_variant = 'full';
     }
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // get the main anchor
         $anchor = Anchors::get($item['anchor']);
         // download the file directly
         $url = Files::get_url($item['id'], 'fetch', $item['file_name']);
         // initialize variables
         $prefix = $suffix = '';
         // flag files that are dead, or created or updated very recently
         if ($item['create_date'] >= $context['fresh']) {
             $suffix .= NEW_FLAG;
         } elseif ($item['edit_date'] >= $context['fresh']) {
             $suffix .= UPDATED_FLAG;
         }
         // signal restricted and private files
         if ($item['active'] == 'N') {
             $prefix .= PRIVATE_FLAG;
         } elseif ($item['active'] == 'R') {
             $prefix .= RESTRICTED_FLAG;
         }
         // file title or file name
         $label = Codes::beautify_title($item['title']);
         if (!$label) {
             $label = ucfirst(str_replace(array('%20', '-', '_'), ' ', $item['file_name']));
         }
         // the main anchor link, except on user profiles
         if (is_object($anchor) && $anchor->get_reference() != $this->focus) {
             $suffix .= ' - <span class="details">' . sprintf(i18n::s('in %s'), Skin::build_link($anchor->get_url(), ucfirst($anchor->get_title()))) . '</span>';
         }
         // list all components for this item
         $items[$url] = array($prefix, $label, $suffix, 'basic', NULL);
     }
     // end of processing
     SQL::free($result);
     return $items;
 }
开发者ID:rair,项目名称:yacs,代码行数:57,代码来源:layout_files_as_simple.php


示例17: layout

 /**
  * list links
  *
  * @param resource the SQL result
  * @return array of resulting items, or NULL
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // we return an array of ($url => $attributes)
     $items = array();
     // empty list
     if (!SQL::count($result)) {
         return $items;
     }
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // get the anchor for this link
         if ($item['anchor']) {
             $anchor = Anchors::get($item['anchor']);
         }
         // url is the link itself
         $url = $item['link_url'];
         // time of last update
         $time = SQL::strtotime($item['edit_date']);
         // the title as the label
         if ($item['title']) {
             $label = $item['title'];
         } else {
             $label = $url;
         }
         // the section
         $section = '';
         if (is_object($anchor)) {
             $section = ucfirst($anchor->get_title());
         }
         // the author(s) is an e-mail address, according to rss 2.0 spec
         $author = $item['edit_address'] . ' (' . $item['edit_name'] . ')';
         // the description
         $description = Codes::beautify($item['description']);
         // cap the number of words
         $description = Skin::cap($description, 300);
         // fix image references
         $description = preg_replace('#"/([^">]+?)"#', '"' . $context['url_to_home'] . '/$1"', $description);
         $introduction = $description;
         // other rss fields
         $extensions = array();
         // list all components for this item
         $items[$url] = array($time, $label, $author, $section, NULL, $introduction, $description, $extensions);
     }
     // end of processing
     SQL::free($result);
     return $items;
 }
开发者ID:rair,项目名称:yacs,代码行数:56,代码来源:layout_links_as_feed.php


示例18: layout

 /**
  * list dates
  *
  * @param resource the SQL result
  * @return string the rendered text
  *
  * @see layouts/layout.php
  **/
 function layout($result)
 {
     global $context;
     // we return an array of ($url => $attributes)
     $items = array();
     // empty list
     if (!SQL::count($result)) {
         return $items;
     }
     // process all items in the list
     while ($item = SQL::fetch($result)) {
         // the url to use
         $url = Articles::get_permalink($item);
         // initialize variables
         $prefix = $suffix = $icon = '';
         // signal restricted and private dates/articles
         if (!isset($item['publish_date']) || $item['publish_date'] <= NULL_DATE) {
             $prefix .= DRAFT_FLAG;
         }
         // signal restricted and private dates/articles
         if (!isset($item['active'])) {
         } elseif ($item['active'] == 'N') {
             $prefix .= PRIVATE_FLAG;
         } elseif ($item['active'] == 'R') {
             $prefix .= RESTRICTED_FLAG;
         }
         // flag new dates/articles
         if ($item['edit_date'] >= $context['fresh']) {
             $suffix .= NEW_FLAG;
         }
         // build a valid label
         if (isset($item['title'])) {
             $label = Codes::beautify_title($item['title']);
             if (isset($item['date_stamp'])) {
                 $label .= ' [' . Skin::build_date($item['date_stamp'], 'day') . ']';
             }
         } else {
             $label = Skin::build_date($item['date_stamp'], 'day');
         }
         // may have variant overlay for links
         $link_type = $this->has_variant('overlaid') ? 'overlaid' : 'basic';
         // list all components for this item
         $items[$url] = array($prefix, $label, $suffix, $link_type, NULL, $item['date_stamp']);
     }
     // end of processing
     SQL::free($result);
     return $items;
 }
开发者ID:rair,项目名称:yacs,代码行数:56,代码来源:layout_dates_as_compact.php


示例19: test

 public function test(CqmPatient $patient, $beginDate, $endDate)
 {
     //Also exclude patients with a diagnosis of pregnancy during the measurement period.
     if (Helper::check(ClinicalType::DIAGNOSIS, Diagnosis::PREGNANCY, $patient, $beginDate, $beginDate) || Helper::check(ClinicalType::DIAGNOSIS, Diagnosis::END_STAGE_RENAL_DISEASE, $patient, $beginDate, $beginDate) || Helper::check(ClinicalType::DIAGNOSIS, Diagnosis::CHRONIC_KIDNEY_DISEASE, $patient, $beginDate, $beginDate)) {
         return true;
     }
     $procedure_code = implode(',', Codes::lookup(Procedure::DIALYSIS_SERVICE, 'SNOMED'));
     //Dialysis procedure exists exclude the patient
     $sql = "SELECT count(*) as cnt FROM procedure_order pr " . "INNER JOIN procedure_order_code prc ON pr.procedure_order_id = prc.procedure_order_id " . "WHERE pr.patient_id = ? " . "AND prc.procedure_code IN ({$procedure_code}) " . "AND (pr.date_ordered BETWEEN ? AND ?)";
     //echo $sql;
     $check = sqlQuery($sql, array($patient->id, $beginDate, $endDate));
     if ($check['cnt'] > 0) {
         return true;
     }
     return false;
 }
开发者ID:juggernautsei,项目名称:openemr,代码行数:16,代码来源:Exclusion.php


示例20: render

 public function render($matches)
 {
     $text = '';
     $mode = $matches[0];
     if ($mode == 'menu') {
         $variant = 'menu_1';
     } elseif ($mode = 'submenu') {
         $variant = 'menu_2';
     } else {
         $variant = $mode;
     }
     $url = isset($matches[2]) ? encode_link($matches[2]) : encode_link($matches[1]);
     $label = isset($matches[2]) ? Codes::fix_tags($matches[1]) : $matches[1];
     $text = Skin::build_link($url, $label, $variant);
     return $text;
 }
开发者ID:rair,项目名称:yacs,代码行数:16,代码来源:code_menu.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Collation类代码示例发布时间:2022-05-23
下一篇:
PHP Codendi_Request类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap