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


PHP Usr函数代码示例

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


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

示例1: usr

 function usr()
 {
     if (!isset($this->Usr)) {
         $this->Usr = Usr($this->usr_id);
     }
     return $this->Usr;
 }
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:7,代码来源:qgEntries.php

示例2: rememberLogin

 static function rememberLogin($do)
 {
     if (Usr()->is()) {
         $E = D()->client_usr->Entry(array('usr_id' => Usr(), 'client_id' => Client()));
         $E->save_login = (int) $do;
     }
 }
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:7,代码来源:Auth.class.php

示例3: allUpdate

 static function allUpdate()
 {
     if (!Usr()->superuser) {
         return false;
     }
     qgEntry_module::updateAuto();
     return 1;
 }
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:8,代码来源:serverInterface.php

示例4: setFront

 static function setFront($t, $f, $v)
 {
     if (!Usr()->superuser) {
         return false;
     }
     D()->query("UPDATE qg_db_field SET dbm_front = " . (int) $v . " WHERE tab='" . $t . "' AND name='" . $f . "' ");
     return true;
 }
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:8,代码来源:serverInterface.php

示例5: login

 static function login($email, $pw)
 {
     $vs = D()->row("SELECT * FROM usr WHERE email = " . D()->quote(trim($email)));
     $Usr = Usr($vs);
     if (!$Usr->active) {
         return 0;
     }
     if ($Usr->pw === md5($pw)) {
         Auth::login($Usr);
         return 1;
     }
     return 0;
 }
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:13,代码来源:serverInterface.php

示例6: init

 static function init()
 {
     !isset($_SESSION) && session_start();
     if (self::$maxpause && isset($_SESSION['qgLastAccessTime']) && $_SESSION['qgLastAccessTime'] + self::$maxpause < time()) {
         $_SESSION = array();
     }
     $_SESSION['qgLastAccessTime'] = time();
     liveClient::init();
     Auth::listen();
     if (!isset($_SESSION['liveSess'])) {
         $_SESSION['liveSess'] = D()->sess->insert(array('ip' => $_SERVER['REMOTE_ADDR'], 'usr_id' => Usr(), 'client_id' => liveClient::$id, 'time' => time()));
     }
     self::$id = $_SESSION['liveSess'];
 }
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:14,代码来源:init.php

示例7: init

 public static function init()
 {
     self::$now = $old_lang = Usr()->lang;
     if (isset($_GET['changeLanguage'])) {
         self::$now = $_GET['changeLanguage'];
     } elseif (preg_match('/^([a-z][a-z])\\//', appRequestUri, $match)) {
         self::$now = $match[1];
     }
     if (!isset(self::$all[self::$now])) {
         self::$now = '';
     }
     if (self::$now === '') {
         self::$now = self::frombrowser();
     }
     if ($old_lang !== self::$now) {
         if (Usr()->is()) {
             D()->usr->Entry(Usr())->lang = self::$now;
         }
     }
 }
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:20,代码来源:lang.php

示例8: init

 public static function init()
 {
     self::$now = Usr()->is() ? Usr()->lang : (isset($_SESSION['qg']['lang']) ? $_SESSION['qg']['lang'] : self::$def);
     if (isset($_GET['changeLanguage'])) {
         self::$now = $_GET['changeLanguage'];
     } elseif (preg_match('/^([a-z][a-z])\\//', appRequestUri, $match)) {
         self::$now = $match[1];
     }
     if (!isset(self::$all[self::$now])) {
         self::$now = '';
     }
     if (self::$now === '') {
         self::$now = self::frombrowser();
     }
     if (Usr()->is()) {
         Usr()->lang = self::$now;
     } else {
         $_SESSION['qg']['lang'] = self::$now;
     }
 }
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:20,代码来源:lang.php

示例9:

            $T = $Cont->text($id . '_desc');
            echo '<div ' . ($Cont->edit ? 'contenteditable cmstxt=' . $T->id : '') . '>' . $T . '</div>';
            break;
        case 'email':
            echo '<input value="' . $value . '" type=email class=input id="l' . $id . '" name="' . $id . '"' . $required . '>';
            break;
        case 'url':
            echo '<input value="' . $value . '" type=url   class=input id="l' . $id . '" name="' . $id . '"' . $required . '>';
            break;
        default:
            echo '<input value="' . $value . '" type=text  class=input id="l' . $id . '" name="' . $id . '"' . $required . '>';
    }
}
?>
	<?php 
if ($Cont->SET['captcha']->v && !Usr()->is()) {
    ?>
		<tr>
			<td> <?php 
    echo $Ticket->captchaImage();
    ?>
			<td> <?php 
    echo $Ticket->captchaInput();
    ?>
	<?php 
}
?>
		<tr>
			<td>
			<td>
				<?php 
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:31,代码来源:index.php

示例10: realpath

<?php

namespace qg;

if (!Usr()->superuser) {
    return false;
    /* show default settings */
}
$file = realpath(appPATH . 'qg/cmsPhpFiles/' . $Cont . '.php');
$_SESSION['fileEditor']['allow'][$file] = 1;
$src = appURL . 'editor?file=' . urldecode($file);
?>
<a style="color:inherit; position:absolute; right: -1px; top: 50px; z-index:1;" target=_blank href="<?php 
echo $src;
?>
">
	<button style="padding:10px 12px">open</button>
</a>
<div style="height:500px;">
	<iframe id="<?php 
echo $i = i();
?>
" src="<?php 
echo $src;
?>
" style="position:absolute; top:0; left:0; right:0; bottom:0; min-height:120px; width:100%; height:100%; border:0"></iframe>
	<script>
	!function(){
		var iframe = document.getElementById('<?php 
echo $i;
?>
开发者ID:nuxodin,项目名称:shwups-cms-v4,代码行数:31,代码来源:options.php

示例11: switch

<?php 
if (isset(G()->loginError)) {
    switch (G()->loginError) {
        case 'username':
        case 'inactive':
        case 'password':
            ?>
		<div class=loginErrot>Ihr Loginversuch ist fehlgeschlagen</div>
	<?php 
    }
}
?>

<?php 
if (!Usr()->is()) {
    ?>

	<?php 
    $i = 0;
    foreach (Client()->Usrs() as $ClientUsr) {
        ?>
 
		<?php 
        if ($Cont->SET['history']->v < ++$i) {
            break;
        }
        $Usr = $ClientUsr->Usr();
        ?>
		<form method=post action="">
				<?php 
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:30,代码来源:index.php

示例12: setField

 static function setField($t, $e, $f, $v)
 {
     if (!Usr()->superuser) {
         return false;
     }
     D()->{$t}->Entry($e)->{$f} = $v;
     return 'zzz_deparced';
 }
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:8,代码来源:serverInterface.php

示例13: D

<?php

require_once 'cms.backend.superuser.db/lib.php';
$t = $vars['table'];
$T = D()->{$t};
$SET_T = $Cont->SET['table'][(string) $T];
//$sqlAccess = $T->accessSql();
$sqlAccess = (int) Usr()->superuser;
$where = "\t" . $sqlAccess . " > 0 ";
if (isset($vars['find'])) {
    $where .= "\tAND " . $T->find($vars['find'], 1);
}
$ShowFs = array();
foreach ($T->Fields() as $F) {
    if (!$SET_T['field'][(string) $F]['show']->v) {
        continue;
    }
    $ShowFs[] = $F;
}
if (isset($vars['search']) && $vars['search']) {
    $h = sqlSearchHelper($vars['search'], $ShowFs);
    $where .= ' AND ' . $h['where'];
}
$perPage = 10;
$num = D()->one("SELECT count(*) FROM " . $T . " WHERE " . $where);
$numPages = ceil($num / $perPage);
$page = isset($vars['page']) ? (int) $vars['page'] : 1;
$page = min($numPages, $page);
$page = max(1, $page);
$sql = "SELECT *, \t\t\t\t\t\t\t\t\t\t\t" . "\t" . $sqlAccess . " as _access\t\t\t\t\t\t" . "FROM \t\t\t\t\t\t\t\t\t\t\t\t" . "\t" . $T . " \t\t\t\t\t\t\t\t\t\t\t" . "WHERE\t\t\t\t\t\t\t\t\t\t\t\t" . "\t" . $where . "  \t\t\t\t\t\t\t\t\t" . (isset($h['order']) ? "ORDER BY " . $h['order'] . "\t\t\t\t\t\t\t" : '') . "LIMIT " . ($page - 1) * $perPage . ", " . $perPage . " " . "";
$res = D()->query($sql);
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:31,代码来源:div.resTable.php

示例14: D

        continue;
    }
    $Ls[$vs['id']] = D()->log->Entry($vs['log_id_ch']);
}
?>
<table style="width:100%" class=noWrap>
<?php 
foreach ($Ls as $pid => $L) {
    ?>
	<tr>
		<td>
			<?php 
    echo qgCms_link($pid);
    ?>
		<td style="width:160px; color:<?php 
    echo Usr()->id == $L->sess()->usr()->id ? 'red' : '';
    ?>
" title="<?php 
    echo hee($L->sess()->usr()->firstname . ' ' . $L->sess()->usr()->lastname);
    ?>
">
			<?php 
    echo $L->sess()->usr()->email;
    ?>
		<?php 
    $d = strftime('%d', $L->time);
    $m = strftime('%m', $L->time);
    $Y = strftime('%Y', $L->time);
    $H = strftime('%H', $L->time);
    $M = strftime('%M', $L->time);
    $nd = strftime('%d');
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:31,代码来源:lastChanges.php

示例15: fromXmlNode

 function fromXmlNode($node)
 {
     if (!$node) {
         return;
     }
     if ($node['module']) {
         $access = D()->one("SELECT access FROM module WHERE name = " . D()->quote($node['module']));
         if ($access || Usr()->superuser) {
             $this->setModule($node['module']);
         }
     }
     if ($node['visible']) {
         $this->setVisible((int) $node['visible']);
     }
     if ($node['offline']) {
         $this->onlineEnd((int) $node['offline']);
     }
     if ($node['public']) {
         $this->setPublic((int) (bool) $node['public']);
     }
     if ($node['class']) {
         foreach (explode(' ', $node['class']) as $class) {
             $this->addClass($class);
         }
     }
     $posCounter = 1;
     foreach ($node->children() as $name => $part) {
         switch ($name) {
             case 'cont':
                 $pos = isset($part['pos']) ? (string) $part['pos'] : $posCounter++;
                 $Cont = $this->Cont($pos);
                 $Cont->fromXmlNode($part);
                 break;
             case 'page':
                 $Cont = $this->createChild();
                 $Cont->fromXmlNode($part);
                 break;
             case 'title':
                 foreach ($part->attributes() as $lang => $title) {
                     isset(L::$all[$lang]) && $this->title()->get($lang)->set($title);
                 }
                 break;
         }
     }
 }
开发者ID:atifzaidi,项目名称:shwups-cms,代码行数:45,代码来源:Page.class.php


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