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


PHP user::id方法代码示例

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


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

示例1: superuser

 function superuser($id = "")
 {
     if (!$id and $id = user::id()) {
         $id = user::id();
     }
     $userArray = user::get($id);
     if (group::superuser($userArray[group])) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
开发者ID:nibble-arts,项目名称:openthesaurus,代码行数:12,代码来源:user.php

示例2: save_status

function save_status($statusArray)
{
    if (user::name() != "gast" and $userID = user::id()) {
        $tempArray = array();
        while ($entry = each($statusArray)) {
            array_push($tempArray, $entry[key] . "=" . $entry[value]);
        }
        $statusString = implode($tempArray, ";");
        if (database::query("UPDATE user SET status='{$statusString}' WHERE ID='{$userID}'")) {
            session::set("stored", time());
        }
    }
}
开发者ID:nibble-arts,项目名称:openthesaurus,代码行数:13,代码来源:session.php

示例3: login

 /**
  * Match User details and Logged in Application
  * 
  * @return	Redirect
  */
 public function login()
 {
     if (user::id()) {
         AZ::redirect('admin/dashboard');
     }
     $post = $this->input->post();
     if ($this->_validate() == FALSE) {
         $this->index();
         return false;
     }
     $user_id = $this->user->authenicate($post['username'], $post['password']);
     if ($user_id) {
         if (have_permission('dashboard/index')) {
             AZ::redirect('admin/dashboard');
         } else {
             user::flush();
             AZ::redirectError('administrator', __('Unauthorized Access', true));
         }
     } else {
         AZ::redirectError('administrator', 'Invalid');
     }
 }
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:27,代码来源:administrator.php

示例4: remove_label

 /**
  * Removed Label and Redirect Back to Messages
  *
  * @param	integer $id
  * @return	redirect
  */
 public function remove_label($id)
 {
     if ($this->db->delete('labels', array('id' => (int) $id, 'user_id' => user::id()))) {
         AZ::redirectSuccess('admin/dashboard/messages', lang('Removed'));
     } else {
         AZ::redirectError('admin/dashboard/messages', lang('Error occured'));
     }
 }
开发者ID:vipertec,项目名称:bootigniter,代码行数:14,代码来源:dashboard.php

示例5:

<?php

$user_id = user::id();
?>


<?php 
if ($user_id) {
    ?>

    <ul class="nav navbar-nav navbar-right profile-menu">

        <li class="dropdown text-right">
            <a href="#" class="dropdown-toggle text-center" data-toggle="dropdown">
                <i class="account-icon glyphicon glyphicon-off"></i> 
                <b class="caret"></b>
            </a>
            <ul class="dropdown-menu dropdown-menu-right text-left">
                <li>
                    <a>
                        <strong><?php 
    __(ucfirst(user::username()));
    ?>
</strong>
                        <br />
                        <span class="muted">
                            <?php 
    __(user::user_group());
    ?>
                        </span>
                    </a>
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:31,代码来源:profile-menu.php

示例6: track

 public function track()
 {
     if (!$this->session->userdata('visited') && $_SERVER['REMOTE_ADDR'] != '::1') {
         AZ::helper('date');
         $this->load->library('user_agent');
         $visitData = array('ip' => $_SERVER['REMOTE_ADDR'], 'is_mobile' => $this->agent->is_mobile(), 'platform' => $this->agent->platform(), 'is_browser' => $this->agent->is_browser(), 'browser' => $this->agent->browser(), 'browser_version' => $this->agent->version(), 'device' => $this->agent->mobile(), 'refer' => $this->agent->referrer(), 'page' => $this->uri->uri_string(), 'logged' => user::id());
         $this->session->set_userdata('visited', 1);
         return $this->db->insert('visitors', $visitData);
     }
 }
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:10,代码来源:content.php

示例7: _a

?>
</strong>

<p>From your Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. 
    Select your place below to view or edit information.</p>

<div class="page-title">
    <h3>Account Information</h3>
</div>
<hr />
<div class="row-fluid">
    <div class="col-md-6">
        <h6>
            <strong>Profile</strong>    
            <small><?php 
_a('account/edit/' . user::id(), __('Edit', true), ' class="pull-right" ');
?>
</small>
        </h6>

        <p>
            <?php 
echo user::username();
?>
            <small class="muted"> ( <?php 
echo user::user_group();
?>
 )</small><br />

        </p>
    </div>
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:31,代码来源:dashboard.php

示例8: __

<?php 
if (user::id()) {
    ?>
    <ul class="list-group">
        <li class="list-group-item"><strong><?php 
    __('My Account');
    ?>
</strong></li>
        <li class="list-group-item">
            <?php 
    _a('account', __('Dashboard', true));
    ?>
        </li>
        <li class="list-group-item"><?php 
    _a('account/edit/' . user::id(), __('Account Profile', true));
    ?>
</li>
        <li class="list-group-item"><?php 
    _a('account/change_password_box', __('Change Paassword', true), ' class="ajax-box" ');
    ?>
</li>
    </ul>
<?php 
} else {
    ?>
    <ul class="list-group">
        <li class="list-group-item"><strong><?php 
    __('My Account');
    ?>
</strong></li>
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:30,代码来源:sidebar-menu.php

示例9: have_permission

 function have_permission($controllerMethod, $access_id = NULL)
 {
     if (!user::id()) {
         return false;
     }
     if (is_null($access_id) || empty($access_id)) {
         $access_id = user::access_id();
     }
     $chunk = explode("/", $controllerMethod);
     $controller = $chunk[0];
     $method = $chunk[1];
     if (empty($controller) || empty($method)) {
         return FALSE;
     }
     $CI =& get_instance();
     $check = $CI->db->get_where('access', array('access_id' => $access_id, 'controller' => $controller, 'method' => $method))->num_rows();
     return $check;
 }
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:18,代码来源:user_helper.php

示例10: login

 public function login()
 {
     user::login('evan', 'test');
     echo user::id();
 }
开发者ID:reang,项目名称:Dingo-Framework,代码行数:5,代码来源:user.php

示例11: form_label

                                <div class="field-row">
                                    <?php 
echo form_label(lang('Subject'), 'subject');
echo form_input(array('class' => 'form-control', 'name' => 'subject'));
?>
                                </div>
                                <div class="field-row">
                                    <?php 
echo form_label(lang('Message'), 'body');
echo form_textarea(array('class' => 'form-control', 'name' => 'body'));
?>
    
                                </div>
                                <div class="panel-footer text-right">
                                    <input type="hidden" name="author" value="<?php 
echo user::id();
?>
" />
                                    <input type="hidden" name="message_id" value="<?php 
echo $message_id;
?>
" />
                                    <a class="btn btn-default" href="<?php 
_u('admin/dashboard/messages');
?>
">
                                        <i class="fa fa-arrow-circle-left"></i>
                                        <?php 
__('Cancel');
?>
                                    </a>
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:31,代码来源:form.php

示例12: foreach

</head>


<body>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>

<?php 
foreach ($_GET as $key => $value) {
    ${$key} = $value;
}
foreach ($_POST as $key => $value) {
    ${$key} = $value;
}
//echoalert($_JS);
// connect database
$daba = new database();
$daba->connect("localhost", "iggmp", "1s87J37r0");
$daba->select("thesaurus");
$exportString = export::print_tree($id, $type);
if ($type == "adlib") {
    $extension = ".xml";
} else {
    $extension = ".csv";
}
$path = "import/export" . user::id() . $extension;
$fHandle = fopen($path, "w");
fputs($fHandle, utf8_decode($exportString));
fclose($fHandle);
echo "<a href='{$path}'>{$type} herunterladen</a>";
?>
</body>
开发者ID:nibble-arts,项目名称:openthesaurus,代码行数:31,代码来源:csv.php

示例13: insert

 function insert($name, $parent, $comment)
 {
     //debug
     //echo "$name - $parent - $comment<br>";
     $owner = user::id();
     // user id
     $status = 2;
     // descriptor
     $linktype = 1;
     // hyrarchic link
     $parentArray = search::get($parent, "exact");
     $entryArray = search::get($name, "exact");
     $parentId = $parentArray[0][ID];
     $entryId = $entryArray[0][ID];
     // entry already exists - create polyseme
     if ($entryId) {
         $name = "{$name} ({$parent})";
     }
     // create new entry
     $entryString = "INSERT INTO entry SET\r\n      name='{$name}',\r\n      owner='{$owner}',\r\n      status='{$status}',\r\n      comment='{$comment}'";
     mysql_query($entryString);
     // get new id
     $newId = mysql_insert_id();
     //debug
     //echo "$parent ($parentId) > $name ($newId)<br>";
     // create link to parent
     if ($newId) {
         $linkString = "INSERT INTO parent SET\r\n        parent='{$parentId}',\r\n        child='{$newId}',\r\n        type='{$linktype}'";
         mysql_query($linkString);
     }
     return $name;
 }
开发者ID:nibble-arts,项目名称:openthesaurus,代码行数:32,代码来源:libimport.php

示例14: getMessagesData

 public function getMessagesData($mode = 'inbox', $message_id = 0, $offset = 0)
 {
     switch ($mode) {
         case 'inbox':
             $limit = AZ::setting('record_per_page');
             $total_message = $this->getMessages('*', array('messages.trash' => 0, 'messages.receiver' => user::id()), 0, 0, true);
             $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message);
             $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 0, 'messages.receiver' => user::id()), $offset, $limit);
             break;
         case 'stared':
             $limit = AZ::setting('record_per_page');
             $total_message = $this->getMessages('*', array('messages.trash' => 0, 'messages.is_star' => 1, 'messages.receiver' => user::id()), 0, 0, true);
             $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message);
             $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 0, 'messages.is_star' => 1, 'messages.receiver' => user::id()), $offset, $limit);
             break;
         case 'outbox':
             $limit = AZ::setting('record_per_page');
             $total_message = $this->getMessages('*', array('messages.trash' => 0, 'messages.author' => user::id()), 0, 0, true);
             $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message);
             $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 0, 'messages.author' => user::id()), $offset, $limit);
             break;
         case 'trash':
             $limit = AZ::setting('record_per_page');
             $total_message = $this->getMessages('*', array('messages.trash' => 1, 'messages.receiver' => user::id()), 0, 0, true);
             $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message);
             $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 1, 'messages.receiver' => user::id()), $offset, $limit);
             break;
         default:
             $limit = AZ::setting('record_per_page');
             $total_message = $this->getMessages('*', array('messages.trash' => 0, 'messages.receiver' => user::id()), 0, 0, true);
             $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message);
             $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 0, 'messages.receiver' => user::id()), $offset, $limit);
             break;
     }
     $messagesData = array('total_message' => $total_message, 'pagination' => $pagination, 'messages' => $messages);
     return $messagesData;
 }
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:37,代码来源:message.php

示例15: __

                    <strong><?php 
__(ucfirst(user::username()));
?>
</strong>
                    <br />
                    <span class="muted">
                        <?php 
__(user::user_group());
?>
                    </span>
                </a>
            </li>
            <li class="divider"></li>
            <li>
                <a href="<?php 
_u('admin/users/edit/' . user::id());
?>
">
                    <i class="fa fa-briefcase"></i>
                    <?php 
__('My Account');
?>
                </a>
            </li>
            <li class="divider"></li>
            <li>
                <a href="<?php 
_u('administrator/logout');
?>
">
                    <i class="fa fa-sign-out"></i>
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:31,代码来源:user-navigation.php


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