本文整理汇总了PHP中is_logged函数的典型用法代码示例。如果您正苦于以下问题:PHP is_logged函数的具体用法?PHP is_logged怎么用?PHP is_logged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_logged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logout
function logout()
{
session_destroy();
session_start();
$_SESSION['auth'] = array("logged" => False, "login_utc" => "", "cas_url" => Cas::getUrl());
return is_logged();
}
示例2: index
function index()
{
global $timeformat, $home;
if (is_logged()) {
$output = '<p><form method="post" action="' . $home . 'shoutbox/escrevepost">
<textarea rows="8" cols="25" name="message"></textarea><br/>
<input type="submit" value="' . t("Enviar") . '">
</form></p><hr size="1">';
}
$qry = mysql_query("SELECT s.id AS d, s.text AS t, s.time AS i, a.login AS l FROM shoutbox s LEFT JOIN accounts a ON s.owner=a.id ORDER BY s.id DESC LIMIT 10");
if (mysql_numrows($qry) != 0) {
$response = true;
while ($row = mysql_fetch_array($qry)) {
$output .= '<p><h3>' . $row['t'] . '</h3><br/><h6>' . t("postado por") . ' ' . url("user/profile/{$row['l']}", $row['l']) . ' ' . t("em") . ' ' . date($timeformat, $row['i']);
if (is_admin()) {
$output .= '<br>' . url("shoutbox/del/{$row['d']}", t("[excluir]"));
}
$output .= '</p><hr size="1">';
}
} else {
$output .= infobox(t("Não há mensagens na shoutbox."), false);
}
if ($response) {
section(substr($output, 0, -13), t("Shoutbox"));
} else {
section($output, t("Shoutbox"));
}
}
示例3: index
function index()
{
if (is_logged()) {
$this->load->library('form_validation');
$this->form_validation->set_rules('creditcard_number', 'Credit Card Number', 'required|max_length[19]');
$this->form_validation->set_rules('creditcard_month', 'Credit Card Expiration Month', 'required|max_length[2]');
$this->form_validation->set_rules('creditcard_year', 'Credit Card Expiration Year', 'required|max_length[4]|callback_credit_card_expiration[' . $this->input->post('creditcard_month') . ']');
if ($this->form_validation->run() !== false) {
$creditcard_number = $this->input->post('creditcard_number');
$creditcard_month = $this->input->post('creditcard_month');
$creditcard_year = $this->input->post('creditcard_year');
$creditcard_number = str_replace(' ', '', $creditcard_number);
$this->load->model('order');
$order = new $this->order();
$order->customer_id = get_customer_id();
$order->total = $this->cart->total();
$order->creditcard_number = $creditcard_number;
$order->creditcard_month = $creditcard_month;
$order->creditcard_year = $creditcard_year;
// save temporary order
$this->session->set_userdata('order', serialize($order));
redirect('checkout/review');
}
$this->load->view('checkout/payment');
} else {
$this->load->view('checkout/index');
}
}
示例4: _authorize
function _authorize()
{
if (is_logged()) {
redirect('main', 'refresh');
}
check_offline();
}
示例5: index
function index()
{
if (is_logged()) {
redir("dashboard");
} else {
redir("account/login");
}
}
示例6: login
public function login()
{
if (is_logged()) {
redirect(logged_url('dashboard'));
}
$this->data['title'] = 'Đăng nhập';
$this->load->view('frontend/user/login', $this->data);
}
示例7: is_readonly
function is_readonly()
{
$needAuth = Config::get('password') != '' ? 1 : 0;
if ($needAuth && !is_logged()) {
return true;
}
return false;
}
示例8: check_property
function check_property($rand_prop, $hash_prop)
{
if (is_logged()) {
return $hash_prop == sha1($_SESSION['login_c'] . $rand_prop);
} else {
return false;
}
}
示例9: preview
public function preview()
{
if (is_logged()) {
$view = $this->input->get('view', true);
$id = $this->input->get('id', true);
$data['lng'] = $this->input->get('lang', true);
if ($view && $id && $data['lng']) {
$data['base_link'] = '?view=' . $view . '&id=' . $id . '';
switch ($view) {
case 'stiri':
$data['title'] = 'Stiri';
$data['article'] = $this->mysql->get_row('stiri', array('id' => $id));
$this->load->view('frontend/preview/stiri_preview_template', $data);
break;
case 'cetatean':
$data['title'] = 'Cetateanul Activ';
$data['article'] = $this->mysql->get_row('cetatean', array('id' => $id));
$this->load->view('frontend/preview/stiri_preview_template', $data);
break;
case 'dosare':
$data['title'] = 'Dosare de coruptie';
$data['article'] = $this->mysql->get_row('dosare', array('id' => $id));
$this->load->view('frontend/preview/stiri_preview_template', $data);
break;
case 'achizitii':
$data['title'] = 'Achizitii publice';
$data['article'] = $this->mysql->get_row('achizitii', array('id' => $id));
$this->load->view('frontend/preview/stiri_preview_template', $data);
break;
case 'blog':
$data['title'] = 'Blog';
$data['article'] = $this->mysql->get_row('blog', array('id' => $id));
$this->load->view('frontend/preview/stiri_preview_template', $data);
break;
case 'interviu':
$data['title'] = 'Interviuri';
$data['article'] = $this->mysql->get_row('interviu', array('id' => $id));
$this->load->view('frontend/preview/stiri_preview_template', $data);
break;
case 'investigatii':
$data['title'] = 'Investigatii';
$data['article'] = $this->mysql->get_row('investigatii', array('id' => $id));
$data['caterg'] = $this->mysql->get_row('categorii', array('id_categorii' => $data['article']['cats']));
$data['slider'] = $this->mysql->get_All('slider', array('parent' => $data['article']['id']));
$data['vars'] = $this->mysql->get_All('vars');
$this->load->view('frontend/preview/investigatii_preview_template', $data);
break;
default:
echo 'Pagina pentru previzualizare este incorecta!';
break;
}
} else {
echo 'Linkul pentru previzualizare este incorect sau lipsesc date pentru a putea identifica articolul cerut pentru previzualizare!';
}
} else {
echo 'Trebuie sa fiti logat pentru a vizualiza acest preview!';
}
}
示例10: login_required
function login_required()
{
if (!is_logged()) {
die('Permission denied');
}
$id = $_SESSION['user']['id'];
$user = new User();
return $user->get("id = '{$id}'");
}
示例11: index
/**
* Placeholder for default functions to be executed
*/
public function index()
{
if (!is_logged()) {
redirect('users/login');
}
//Get the user id
//Load a home view
$user = get_user();
$this->load->view('users/home', array('user' => $user));
}
示例12: have_write_access
function have_write_access()
{
if (Config::get('password') == '') {
return true;
}
if (is_logged()) {
return true;
}
return false;
}
示例13: list_orders
function list_orders()
{
if (!is_logged()) {
redirect('/');
}
$this->load->model('orders');
$this->load->model('order');
$data['orders'] = $this->orders->getAllFromCustomer(get_customer_id());
$this->load->view('orders', $data);
}
示例14: index
public function index()
{
if (is_logged(false)) {
redirect(base_url());
}
set_theme('title', 'Login');
set_theme('content', load_module('login', 'login'));
set_theme('bodyClass', 'login bg-login printable');
set_theme('pluginsJS', load_javascript(array('user-pages', 'initialize-login')), false);
load_template();
}
示例15: index
/**
* Placeholder for default functions to be executed
*/
public function index()
{
if (!is_logged()) {
redirect('users/login');
}
//Get the user id
//Load a home view
$user = get_user();
$this->template->set('menu_title', 'Data Majelis')->set('menu_group', 'active')->set('group_total', $config['total_rows'])->set('group', $group)->set('no', $no)->set('user', $user)->build('users/home');
//$this->load->view('users/home', array('user'=>$user));
}