本文整理汇总了PHP中auth::isAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::isAdmin方法的具体用法?PHP auth::isAdmin怎么用?PHP auth::isAdmin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类auth
的用法示例。
在下文中一共展示了auth::isAdmin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mail2secretary
public static function mail2secretary($data, $action)
{
global $mailClass;
$owner = auth::getGecos($data["owneruid"], 0);
$pp = self::getFullPpNumber($data["year"], $data["ppn"]);
return self::sendMail(PP_MAIL_SECRETARY, $pp . " " . $action . " for " . $owner, self::mail_preprint_prettyprinted($data, $owner, $pp, $action), auth::isAdmin());
}
示例2: getPendingPreprints
public function getPendingPreprints($where = "")
{
$outRecord = array();
$authorUid = auth::getUid();
//TODO@@@ debug:
//$authorUid = -1180; // Axel Brandenburg
//$authorUid = 127105; // Paolo Di Vecchia
if (empty($authorUid) && !auth::isAdmin()) {
return array();
}
// ----------------------
$sql = "SELECT " . " `RowId`," . " `Id`," . " `Tm`," . " `Year`," . " `Report`," . " `Status`," . " `Field`," . " `Location`," . " `Authors`," . " `Title`," . " `PublIn`," . " `publ_year`," . " `label` " . "FROM " . " " . $this->dbprefix . PP_DATATABLE . " " . "WHERE " . "(Status!='ok') " . "AND (Status!='free') " . (!empty($authorUid) ? " AND (Id = '" . $authorUid . "') " : "") . (!empty($where) ? " AND " . $where . " " : "") . "ORDER BY " . " Year,Report DESC";
// ----------------------
$res = $this->query($sql);
// includes a call to connect
if ($this->num_rows($res)) {
while ($row = $this->next_record_assoc($res)) {
$outRecord[] = $this->translatePrpFieldsToStandard($row);
}
// end while
}
// end if
// ----------------------
return $outRecord;
}
示例3: function
request = null;
}
};
}
ajax(jsonURL,null,drawChart );
window.onload = function() {
//ieCanvasInit('includes/iecanvas.htc');
// draw();
};
</script>
<?php
if ($CONF_airspaceChecks && auth::isAdmin($userID)) {
?>
<script language="javascript">
function toggleAirspace(radioObj) {
if(!radioObj) return "";
if(radioObj.checked) {
showAirspace=1;
for (var i=0; i<polys.length; i++) {
map.addOverlay(polys[i]);
}
} else {
showAirspace=0;
for (var i=0; i<polys.length; i++) {
map.removeOverlay(polys[i]);
}