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


PHP SLA::lookup方法代码示例

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


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

示例1: getDefaultSLA

 function getDefaultSLA()
 {
     if (!$this->defaultSLA && $this->getDefaultSLAId()) {
         $this->defaultSLA = SLA::lookup($this->getDefaultSLAId());
     }
     return $this->defaultSLA;
 }
开发者ID:nunomartins,项目名称:osTicket-1.7,代码行数:7,代码来源:class.config.php

示例2: getSLA

 function getSLA()
 {
     if (!$this->sla && $this->getSLAId()) {
         $this->sla = SLA::lookup($this->getSLAId());
     }
     return $this->sla;
 }
开发者ID:dmiguel92,项目名称:osTicket-1.8,代码行数:7,代码来源:class.dept.php

示例3: IN

         case 'disable':
             $sql = 'UPDATE ' . SLA_TABLE . ' SET isactive=0 ' . ' WHERE id IN (' . implode(',', db_input($_POST['ids'])) . ')';
             if (db_query($sql) && ($num = db_affected_rows())) {
                 if ($num == $count) {
                     $msg = sprintf(__('Successfully disabled %s'), _N('selected SLA plan', 'selected SLA plans', $count));
                 } else {
                     $warn = sprintf(__('%1$d of %2$d %3$s disabled'), $num, $count, _N('selected SLA plan', 'selected SLA plans', $count));
                 }
             } else {
                 $errors['err'] = sprintf(__('Unable to disable %s'), _N('selected SLA plan', 'selected SLA plans', $count));
             }
             break;
         case 'delete':
             $i = 0;
             foreach ($_POST['ids'] as $k => $v) {
                 if (($p = SLA::lookup($v)) && $p->getId() != $cfg->getDefaultSLAId() && $p->delete()) {
                     $i++;
                 }
             }
             if ($i && $i == $count) {
                 $msg = sprintf(__('Successfully deleted %s'), _N('selected SLA plan', 'selected SLA plans', $count));
             } elseif ($i > 0) {
                 $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected SLA plan', 'selected SLA plans', $count));
             } elseif (!$errors['err']) {
                 $errors['err'] = sprintf(__('Unable to delete %s'), _N('selected SLA plan', 'selected SLA plans', $count));
             }
             break;
         default:
             $errors['err'] = __('Unknown action - get technical help.');
     }
 }
开发者ID:dmiguel92,项目名称:osTicket-1.8,代码行数:31,代码来源:slas.php

示例4: sprintf

                        if(db_query($sql) && ($num=db_affected_rows())) {
                            if($num==$count)
                                $msg = sprintf(__('Successfully disabled %s'),
                                    _N('selected SLA plan', 'selected SLA plans', $count));
                            else
                                $warn = sprintf(__('%1$d of %2$d %3$s disabled'), $num, $count,
                                    _N('selected SLA plan', 'selected SLA plans', $count));
                        } else {
                            $errors['err'] = sprintf(__('Unable to disable %s'),
                                _N('selected SLA plan', 'selected SLA plans', $count));
                        }
                        break;
                    case 'delete':
                        $i=0;
                        foreach($_POST['ids'] as $k=>$v) {
                            if (($p=SLA::lookup($v))
                                && $p->getId() != $cfg->getDefaultSLAId()
                                && $p->delete())
                                $i++;
                        }

                        if($i && $i==$count)
                            $msg = sprintf(__('Successfully deleted %s'),
                                _N('selected SLA plan', 'selected SLA plans', $count));
                        elseif($i>0)
                            $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count,
                                _N('selected SLA plan', 'selected SLA plans', $count));
                        elseif(!$errors['err'])
                            $errors['err'] = sprintf(__('Unable to delete %s'),
                                _N('selected SLA plan', 'selected SLA plans', $count));
                        break;
开发者ID:KingsleyGU,项目名称:osticket,代码行数:31,代码来源:slas.php

示例5: elseif

         }
     } elseif ($_POST['disable']) {
         $sql = 'UPDATE ' . SLA_TABLE . ' SET isactive=0  WHERE id IN (' . implode(',', db_input($_POST['ids'])) . ')';
         if (db_query($sql) && ($num = db_affected_rows())) {
             if ($num == $count) {
                 $msg = 'Selected SLA plans disabled';
             } else {
                 $warn = "{$num} of {$count} selected SLA plans disabled";
             }
         } else {
             $errors['err'] = 'Unable to disable selected SLA plans';
         }
     } elseif ($_POST['delete']) {
         $i = 0;
         foreach ($_POST['ids'] as $k => $v) {
             if (($p = SLA::lookup($v)) && $p->delete()) {
                 $i++;
             }
         }
         if ($i && $i == $count) {
             $msg = 'Selected SLA plans deleted successfully';
         } elseif ($i > 0) {
             $warn = "{$i} of {$count} selected SLA plans deleted";
         } elseif (!$errors['err']) {
             $errors['err'] = 'Unable to delete selected SLA plans';
         }
     } else {
         $errors['err'] = 'Unknown action';
     }
 }
 break;
开发者ID:nunomartins,项目名称:osTicket-1.7,代码行数:31,代码来源:slas.php


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