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


PHP sbr_meta::parseOpComment方法代码示例

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


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

示例1: unset

        if (preg_match('~(?:СБР|БС)-(\\d+)-[ТАПБ]/О~', $historyItem['comments'], $m)) {
            if ((int) $m[1]) {
                $sbrIds[] = (int) $m[1];
                $historyItem['sbrId'] = (int) $m[1];
                $nSbr++;
            }
        }
    }
}
unset($historyItem);
if ($nSbr) {
    $sbrSchemes = sbr_meta::getShemesSbr($sbrIds);
    if ($sbrSchemes) {
        foreach ($history['items'] as &$historyItem) {
            if ((int) $historyItem["sbrId"]) {
                $historyItem['comments'] = sbr_meta::parseOpComment($historyItem['comments'], null, null, $sbrSchemes[$historyItem["sbrId"]]);
            }
        }
    }
}
unset($historyItem);
// делаем уведомления прочитанными
$barNotify = new bar_notify($_SESSION['uid']);
$barNotify->delNotifies(array('page' => 'bill'));
if ($page > 1 && $page > $history['pagesCount']) {
    header_location_exit('/404.php');
}
$events = account::searchBillEvent($startTime ? $startTime : '2000-01-01', time());
$js_file = array('billing.js');
$is_jury = sbr_meta::isFtJuri($uid);
$is_emp = is_emp();
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例2: historyAction


//.........这里部分代码省略.........
                     break;
                 }
                 if ($op_code == 77) {
                     $op_code = '36,77';
                 }
                 if ($op_code == 78) {
                     $op_code = '37,78';
                 }
                 if ($op_code == 79) {
                     $op_code = '38,79';
                 }
                 $type = ' AND op_code IN (' . $op_code . ')';
                 front::og('tpl')->opselect = $opcode;
                 break;
                 /*case "i":
                 		$page = intval(substr($v3, 1, strlen($v3)-1));
                 		break;	*/
             /*case "i":
             		$page = intval(substr($v3, 1, strlen($v3)-1));
             		break;	*/
             case 'a':
                 // По умолчанию
             // По умолчанию
             default:
                 $type = false;
                 break;
         }
     }
     $page = $v0;
     if ($page <= 0) {
         $page = 1;
     }
     if (strlen($page) > 6) {
         header('Location: /404.php');
         exit;
     }
     front::og('tpl')->sort = $v1 == 0 ? $v1 + 1 : $v1;
     // Сортировка по столбцам
     if (!isset($_COOKIE['bill_history_pp'])) {
         setcookie('bill_history_pp', 20, time() + 24 * 60 * 60 * 1000, '/');
         $perpage = 20;
     } else {
         $perpage = (int) $_COOKIE['bill_history_pp'];
     }
     $history = $this->account->searchBillHistory($sday, $eday, $v1, $type, $page, $pages, $total, $perpage);
     // Берем историю по конкретному промежутку времени
     //Идентификаторы СБР для получения признака новая или старая
     $sbrIds = array();
     $nSbr = 0;
     foreach ($history as $key => $val) {
         if (in_array($val['op_code'], array(sbr::OP_RESERVE, sbr::OP_DEBIT, sbr::OP_CREDIT))) {
             if (preg_match('~СБР-(\\d+)-[ТАПБ]/О~', $val['comments'], $m)) {
                 if ((int) $m[1]) {
                     $sbrIds[] = (int) $m[1];
                     $history[$key]['sbrId'] = (int) $m[1];
                     ++$nSbr;
                 }
             }
             //$comments = sbr_meta::parseOpComment($comments);
         }
     }
     if ($nSbr) {
         $sbrSchemes = sbr_meta::getShemesSbr($sbrIds);
         if ($sbrSchemes) {
             foreach ($history as $key => $val) {
                 if ((int) $val['sbrId']) {
                     $val['comments'] = sbr_meta::parseOpComment($val['comments'], null, null, $sbrSchemes[$val['sbrId']]);
                     $history[$key] = $val;
                 }
             }
         }
     }
     front::og('tpl')->per_page = $perpage;
     front::og('tpl')->page_h = $page;
     front::og('tpl')->pages_h = $pages;
     front::og('tpl')->total_h = $total;
     //    	echo $pages." - ".$total;
     /*
      * Тестовый функционал.
      */
     if ($history) {
         $acc = null;
         foreach ($history as $k => &$v) {
             if ($v['op_code'] == 23) {
                 $exec[$v['id']] = $v['id'];
             }
             if ($v['op_code'] == 12 && !trim($v['comments'])) {
                 $v['comments'] = 'Пополнение счета через ' . account::GetPSName($v['payment_sys']);
             }
         }
     }
     front::og('tpl')->total_fm = $this->account->getSumAmmountSpentService(get_uid(false));
     //$o_mny;
     front::og('tpl')->history = $history;
     front::og('tpl')->exec = @$exec;
     front::og('tpl')->event = $this->account->searchBillEvent($sday, $eday);
     // Имена событий использующие в данном промежутке времени
     front::og('tpl')->calendar = $this->account->getDateBillOperation($month, false, false, $year);
     front::og('tpl')->display('bill/bill_history.tpl');
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:page_bill.class.php

示例3: foreach

	<td colspan="6" class="small">&nbsp;</td>
</tr>
<tr>
	<td width="100">№</td>
    <td width="120">Дата</td>
    <td width="80">Баланс</td>
    <td width="80">Сумма</td>
    <td width="220">Событие</td>
    <td>Комментарии</td>
</tr>
<?php 
    foreach ($history as $ikey => $hist) {
        $comments = $hist['comments'];
        if (in_array($hist['op_code'], array(sbr::OP_RESERVE, sbr::OP_DEBIT, sbr::OP_CREDIT))) {
            $scheme = strtotime($hist['op_date']) > mktime(0, 0, 0, 11, 1, 2012) ? sbr::SCHEME_LC : sbr::SCHEME_AGNT;
            $comments = sbr_meta::parseOpComment($comments, $user->login, is_emp($user->role), $scheme);
        }
        ?>
<tr class="small" valign="baseline">
	<td><a name="<?php 
        echo $hist['id'];
        ?>
"></a><?php 
        echo $hist['id'];
        ?>
</td>
	<td><?php 
        echo date("d.m.Y | H:i", strtotimeEx($hist['op_date']));
        ?>
</td>
    <td><?php 
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:inner_index.php


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