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


PHP common::hasPriv方法代码示例

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


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

示例1: substr

</td>
                <td><?php 
    echo substr($bug->openedDate, 5, 11);
    ?>
</td>
                <td><?php 
    echo $users[$bug->resolvedBy];
    ?>
</td>
                <td><?php 
    echo substr($bug->resolvedDate, 5, 11);
    ?>
</td>
                <td>
                  <?php 
    if (common::hasPriv('build', 'unlinkBug')) {
        $unlinkURL = inlink('unlinkBug', "buildID={$build->id}&bug={$bug->id}");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"bugList\",confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn-icon' title='{$lang->build->unlinkBug}'");
    }
    ?>
                </td>
              </tr>
              <?php 
}
?>
              <tfoot>
                <tr>
                  <td colspan='8'>
                    <div class='table-actions clearfix'>
                      <?php 
if ($countBugs and $canBatchUnlink) {
开发者ID:caiwenhao,项目名称:zentao,代码行数:31,代码来源:view.html.php

示例2: date

    ?>
</td>
      <td><?php 
    if ($user->last) {
        echo date('Y-m-d', $user->last);
    }
    ?>
</td>
      <td><?php 
    echo $user->visits;
    ?>
</td>
      <td class='a-left w-80px'>
        <?php 
    common::printIcon('user', 'edit', "userID={$user->id}&from=company", '', 'list');
    if (strpos($this->app->company->admins, ",{$user->account},") === false and common::hasPriv('user', 'delete')) {
        $deleteURL = $this->createLink('user', 'delete', "userID={$user->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$deleteURL}\",\"userList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->user->delete}' class='btn-icon'");
    }
    if (strtotime(date('Y-m-d H:i:s')) - strtotime($user->locked) < $this->config->user->lockMinutes * 60) {
        common::printIcon('user', 'unlock', "userID={$user->account}", '', 'list', '', "hiddenwin");
    }
    ?>
      </td>
    </tr>
    <?php 
}
?>
    </tbody>
    <tfoot>
    <tr>
开发者ID:iamazhi,项目名称:zentaopms,代码行数:31,代码来源:browse.html.php

示例3:

'>
      <div class='panel'>
        <div class='panel-heading'>
          <i class='icon-cog'></i> <strong><?php 
echo $title;
?>
</strong>
        </div>
        <div class='panel-body'>
          <div id='main'><?php 
echo $modules;
?>
</div>
          <div class='text-center'>
            <?php 
if (common::hasPriv('tree', 'updateorder')) {
    echo html::submitButton($lang->tree->updateOrder);
}
?>
          </div>
        </div>
      </div>
    </form>
  </div>
  <div class='col-sm-6 col-md-8 col-lg-9'>
    <form class='form-condensed' method='post' target='hiddenwin' action='<?php 
echo $this->createLink('tree', 'manageChild', "root={$root->id}&viewType=task");
?>
'>
      <div class='panel'>
        <div class='panel-heading'>
开发者ID:XMGmen,项目名称:zentao,代码行数:31,代码来源:browsetask.html.php

示例4:

    ?>
</td>
                    <td><?php 
    echo $users[$bug->assignedTo];
    ?>
</td>
                    <td class='bug-<?php 
    echo $bug->status;
    ?>
'><?php 
    echo $lang->bug->statusList[$bug->status];
    ?>
</td>
                    <td>
                      <?php 
    if (common::hasPriv('productplan', 'unlinkBug')) {
        $unlinkURL = $this->createLink('productplan', 'unlinkBug', "story={$bug->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"bugList\",confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn-icon' title='{$lang->productplan->unlinkBug}'");
    }
    ?>
                    </td>
                  </tr>
                  <?php 
}
?>
                </tbody>
                <tfoot>
                <tr>
                  <td colspan='7'>
                    <div class='table-actions clearfix'>
                      <?php 
开发者ID:jsyinwenjun,项目名称:zentao,代码行数:31,代码来源:view.html.php

示例5:

<div id='titlebar'>
  <div class='heading'>
    <span class='prefix'><?php 
echo html::icon($lang->icons['bug']);
?>
</span>
    <strong><small class='text-muted'><?php 
echo html::icon($lang->icons['batchCreate']);
?>
</small> <?php 
echo $lang->bug->common . $lang->colon . $lang->bug->batchCreate;
?>
</strong>
    <div class='actions'>
      <?php 
if (common::hasPriv('file', 'uploadImages')) {
    echo html::a($this->createLink('file', 'uploadImages', 'module=bug&params=' . helper::safe64Encode("productID={$productID}&projectID={$projectID}&moduleID={$moduleID}")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn' data-width='600px'");
}
?>
      <?php 
echo html::commonButton($lang->pasteText, "data-toggle='myModal'");
?>
    </div>
  </div>
</div>

<form class='form-condensed' class='form-condensed' method='post' target='hiddenwin'>
  <table class='table table-fixed table-form'>
    <thead>
      <tr>
        <th class='w-50px'>  <?php 
开发者ID:fanscky,项目名称:HTPMS,代码行数:31,代码来源:batchcreate.html.php

示例6: printf

  </tr>
  <?php 
    $times += $effort->consumed;
    ?>
  <?php 
}
?>
  </tbody>
  <tfoot>
    <tr>
      <td colspan='7'>
        <div class='table-actions clearfix'>
          <?php 
if ($efforts) {
    echo html::selectAll() . html::selectReverse();
    if (common::hasPriv('effort', 'batchEdit')) {
        echo html::submitButton($lang->effort->batchEdit);
    }
}
if ($times) {
    printf('<div class="text">' . $lang->company->effort->timeStat . '</div>', $times);
}
?>
        </div>
        <?php 
$pager->show();
?>
      </td>
    </tr>
  </tfoot>
</table>
开发者ID:xupnge1314,项目名称:project,代码行数:31,代码来源:effort.html.php

示例7:

    ?>
</td>
      <td class='text-left nobr'><nobr><?php 
    echo html::a($viewLink, $doc->title);
    ?>
</nobr></td>
      <td><?php 
    echo $users[$doc->addedBy];
    ?>
</td>
      <td><?php 
    echo $doc->addedDate;
    ?>
</td>
      <td>
        <?php 
    common::printIcon('doc', 'edit', "doc={$doc->id}", '', 'list');
    if (common::hasPriv('doc', 'delete')) {
        $deleteURL = $this->createLink('doc', 'delete', "docID={$doc->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$deleteURL}\",\"docList\",confirmDelete)", '<i class="icon-remove"></i>', '', "class='btn-icon' title='{$lang->doc->delete}'");
    }
    ?>
      </td>
    </tr>
    <?php 
}
?>
  </tbody>
</table>
<?php 
include '../../common/view/footer.html.php';
开发者ID:caiwenhao,项目名称:zentao,代码行数:31,代码来源:doc.html.php

示例8:

    ?>
'><?php 
    echo $lang->bug->statusList[$bug->status];
    ?>
</td>
                <td><?php 
    echo $users[$bug->openedBy];
    ?>
</td>
                <td><?php 
    echo $bug->openedDate;
    ?>
</td>
                <td>
                  <?php 
    if (common::hasPriv('release', 'unlinkBug')) {
        $unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID={$release->id}&bug={$bug->id}&type=leftBug");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"leftBugList\",confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn-icon' title='{$lang->release->unlinkBug}'");
    }
    ?>
                </td>
              </tr>
              <?php 
}
?>
              <tfoot>
                <tr>
                  <td colspan='7'>
                    <div class='table-actions clearfix'>
                      <div class='text'>
                        <?php 
开发者ID:caiwenhao,项目名称:zentao,代码行数:31,代码来源:view.html.php

示例9: count

}
?>
  </tbody>
  <tfoot>
  <tr>
    <td colspan='<?php 
echo count($customFields) + 1;
?>
'>
      <?php 
if (!empty($bugs)) {
    ?>
      <div class='f-left'>
        <?php 
    echo html::selectAll() . html::selectReverse();
    if (common::hasPriv('bug', 'batchEdit') and $bugs) {
        echo html::submitButton($lang->edit);
    }
    ?>
      </div>
      <?php 
}
?>
      <div class='f-right'><?php 
$pager->show();
?>
</div>
    </td>
  </tr>
  </tfoot>
</table>
开发者ID:laiello,项目名称:zentaoms,代码行数:31,代码来源:buglist.custom.html.php

示例10: printf

        if ($cron->buildin == 0 and common::hasPriv('cron', 'delete')) {
            echo html::a(inlink('delete', "id={$cron->id}"), $lang->delete, 'hiddenwin');
        }
        ?>
        </td>
      </tr>
    <?php 
    }
    ?>
    </tbody>
  </table>
</div>
<?php 
} else {
    ?>
<div class='container mw-700px'>
  <div class='panel-body'>
    <?php 
    echo $lang->cron->introduction;
    if (common::hasPriv('cron', 'turnon')) {
        printf($lang->cron->confirmOpen, inlink('turnon'));
    }
    ?>
  </div>
</div>
<?php 
}
include '../../common/view/footer.html.php';
?>

开发者ID:XMGmen,项目名称:zentao,代码行数:29,代码来源:index.html.php

示例11: printModuleMenu

 /**
  * Print the module menu.
  * 
  * @param  string $moduleName 
  * @static
  * @access public
  * @return void
  */
 public static function printModuleMenu($moduleName)
 {
     global $lang, $app;
     if (!isset($lang->{$moduleName}->menu)) {
         echo "<ul></ul>";
         return;
     }
     /* Get the sub menus of the module, and get current module and method. */
     $submenus = $lang->{$moduleName}->menu;
     $currentModule = $app->getModuleName();
     $currentMethod = $app->getMethodName();
     /* Sort the subMenu according to menuOrder. */
     if (isset($lang->{$moduleName}->menuOrder)) {
         $menus = json_decode(json_encode($submenus), true);
         $submenus = new stdclass();
         ksort($lang->{$moduleName}->menuOrder, SORT_ASC);
         if (isset($menus['list'])) {
             $submenus->list = $menus['list'];
             unset($menus['list']);
         }
         foreach ($lang->{$moduleName}->menuOrder as $order) {
             if ($order != 'list' && isset($menus[$order])) {
                 $subOrder = $menus[$order];
                 unset($menus[$order]);
                 $submenus->{$order} = $subOrder;
             }
         }
         foreach ($menus as $key => $menu) {
             $submenus->{$key} = $menu;
         }
     }
     /* The beginning of the menu. */
     echo "<ul class='nav'>\n";
     /* Cycling to print every sub menus. */
     foreach ($submenus as $subMenuKey => $submenu) {
         /* Init the these vars. */
         $link = $submenu;
         $subModule = '';
         $alias = '';
         $float = '';
         $active = '';
         $target = '';
         if (is_array($submenu)) {
             extract($submenu);
         }
         // If the sub menu is an array, extract it.
         /* Print the menu. */
         if (strpos($link, '|') === false) {
             echo "<li>{$link}</li>\n";
         } else {
             $link = explode('|', $link);
             list($label, $module, $method) = $link;
             $vars = isset($link[3]) ? $link[3] : '';
             if (common::hasPriv($module, $method)) {
                 /* Is the currentModule active? */
                 $subModules = explode(',', $subModule);
                 if (in_array($currentModule, $subModules) and $float != 'right') {
                     $active = 'active';
                 }
                 if ($module == $currentModule and ($method == $currentMethod or strpos(",{$alias},", ",{$currentMethod},") !== false) and $float != 'right') {
                     $active = 'active';
                 }
                 echo "<li class='{$float} {$active}'>" . html::a(helper::createLink($module, $method, $vars), $label, $target, "id=submenu{$subMenuKey}") . "</li>\n";
             }
         }
     }
     echo "</ul>\n";
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:76,代码来源:model.php

示例12: isset

  <div class='actions'>
    <div class='btn-group'>
      <div class='btn-group'>
        <button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
          <i class='icon-download-alt'></i> <?php 
echo $lang->export;
?>
          <span class='caret'></span>
        </button>
        <ul class='dropdown-menu' id='exportActionMenu'>
        <?php 
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID={$productID}&orderBy={$orderBy}") : '#';
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID={$productID}") : '#';
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
?>
        </ul>
      </div>
      <?php 
common::printIcon('testcase', 'import', "productID={$productID}", '', 'button', '', '', 'export cboxElement iframe');
$initModule = isset($moduleID) ? (int) $moduleID : 0;
common::printIcon('testcase', 'batchCreate', "productID={$productID}&moduleID={$initModule}");
common::printIcon('testcase', 'create', "productID={$productID}&moduleID={$initModule}");
?>
    </div>
  </div>
  <div id='querybox' class='<?php 
if ($browseType == 'bysearch') {
    echo 'show';
开发者ID:fanscky,项目名称:HTPMS,代码行数:31,代码来源:caseheader.html.php

示例13:

        echo $lang->testcase->resultList[$run->lastRunResult];
    }
    ?>
</td>
          <td class='<?php 
    echo $run->status;
    ?>
'><?php 
    echo $run->version < $run->caseVersion ? "<span class='warning'>{$lang->testcase->changed}</span>" : $lang->testtask->statusList[$run->status];
    ?>
</td>
          <td class='text-center'>
            <?php 
    common::printIcon('testtask', 'runCase', "id={$run->id}", '', 'list', '', '', 'runCase iframe');
    common::printIcon('testtask', 'results', "id={$run->id}", '', 'list', '', '', 'iframe');
    if (common::hasPriv('testtask', 'unlinkCase')) {
        $unlinkURL = $this->createLink('testtask', 'unlinkCase', "caseID={$run->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"caseList\",confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$lang->testtask->unlinkCase}' class='btn-icon'");
    }
    common::printIcon('testcase', 'createBug', "product={$productID}&extra=projectID={$task->project},buildID={$task->build},caseID={$run->case},version={$run->version},runID={$run->id},testtask={$taskID}", $run, 'list', 'bug', '', 'iframe');
    ?>
          </td>
        </tr>
        <?php 
}
?>
      </tbody>
      <tfoot>
        <tr>
          <td colspan='10'>
            <?php 
开发者ID:XMGmen,项目名称:zentao,代码行数:31,代码来源:cases.html.php

示例14:

    ?>
</td>
        <td class='story-<?php 
    echo $story->status;
    ?>
'><?php 
    echo $lang->story->statusList[$story->status];
    ?>
</td>
        <td><?php 
    echo $lang->story->stageList[$story->stage];
    ?>
</td>
        <td class='text-center'>
          <?php 
    if (common::hasPriv('productplan', 'unlinkStory')) {
        $unlinkURL = $this->createLink('productplan', 'unlinkStory', "storyID={$story->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"storyList\",confirmUnlinkStory)", '<i class="icon-remove"></i>', '', "title='{$lang->productplan->unlinkStory}' class='btn-icon'");
    }
    ?>
        </td>
      </tr>
      <?php 
}
?>
      <?php 
if (count($planStories) and $canBatchUnlink) {
    ?>
      <tfoot>
      <tr>
        <td colspan='9' class='text-left'>
开发者ID:fanscky,项目名称:HTPMS,代码行数:31,代码来源:linkstory.html.php

示例15: createTaskManageLink

 /**
  * Create the task manage link of a module.
  * 
  * @param  int    $productID 
  * @param  int    $module 
  * @access public
  * @return void
  */
 public function createTaskManageLink($type, $module, $extra)
 {
     $projectID = $extra['projectID'];
     $productID = $extra['productID'];
     $tip = $extra['tip'];
     $linkHtml = $module->name;
     $linkHtml .= ($tip and $module->type != 'story') ? ' [T]' : '';
     if ($module->type == 'story') {
         if (common::hasPriv('tree', 'browseTask')) {
             $linkHtml .= ' ' . html::a(helper::createLink('tree', 'browsetask', "rootID={$projectID}&productID={$productID}&module={$module->id}"), $this->lang->tree->child);
         }
     } else {
         if (common::hasPriv('tree', 'edit')) {
             $linkHtml .= ' ' . html::a(helper::createLink('tree', 'edit', "module={$module->id}&type=task"), $this->lang->tree->edit, '', 'data-toggle="modal" data-type="ajax"');
         }
         if (common::hasPriv('tree', 'browseTask')) {
             $linkHtml .= ' ' . html::a(helper::createLink('tree', 'browsetask', "rootID={$projectID}&productID={$productID}&module={$module->id}"), $this->lang->tree->child);
         }
         if (common::hasPriv('tree', 'delete')) {
             $linkHtml .= ' ' . html::a(helper::createLink('tree', 'delete', "root={$module->root}&module={$module->id}"), $this->lang->delete, 'hiddenwin');
         }
         if (common::hasPriv('tree', 'updateorder')) {
             $linkHtml .= ' ' . html::input("orders[{$module->id}]", $module->order, 'style="width:30px;text-align:center"');
         }
     }
     return $linkHtml;
 }
开发者ID:fanscky,项目名称:HTPMS,代码行数:35,代码来源:model.php


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