• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_login函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: show_page

function show_page($page)
{
    $template = "view/templates/default_template.php";
    if (file_exists($template) && is_file($template)) {
        require_once $template;
    } else {
        require_once "view/templates/default_template.php";
    }
    echo get_document_head();
    echo get_header_start();
    if (is_logged_in()) {
        echo get_logout();
    } else {
    }
    echo get_header_end();
    if (is_logged_in()) {
        echo get_menu();
    } else {
        echo get_guest_menu();
    }
    if (is_logged_in()) {
        if ($page == "startpage") {
            echo "startpage";
        } else {
            if ($page == "fileupload") {
                echo get_fileupload();
            } else {
                if ($page == "nyheter") {
                    echo get_news();
                } else {
                    if ($page == "flowing") {
                        echo get_flowing();
                    } else {
                        if ($page == "event") {
                            echo get_event();
                        } else {
                            if ($page == "profile") {
                                $user_id = 1;
                                echo get_profile($user_id);
                            } else {
                                echo get_default("");
                            }
                        }
                    }
                }
            }
        }
    } else {
        echo get_login();
    }
    echo get_footer();
    echo get_document_end();
}
开发者ID:eva-chaunm,项目名称:paraflow,代码行数:53,代码来源:page.php


示例2: audit

/**
 * Audits an important action in the global audit log
 */
function audit($action, $message)
{
    $now = new DateTime();
    $when = $now->format('Y-m-d H:i:s');
    $ip = $_SERVER["REMOTE_ADDR"];
    $user = get_login();
    if ($user == NULL) {
        $user = "unknown user";
    }
    $db = DB::get_db();
    $sql = sprintf("INSERT INTO audit_logs (`when`, ip, user, action, message)" . "VALUES ('%s', '%s', '%s', '%s', '%s')", $db->real_escape_string($when), $db->real_escape_string($ip), $db->real_escape_string($user), $db->real_escape_string($action), $db->real_escape_string($message));
    if (!$db->query($sql)) {
        error_log("Unable to insert into audit_logs: " . $db->error . " (sql: {$sql})");
        return FALSE;
    }
    return TRUE;
}
开发者ID:uoregon-libraries,项目名称:pdf-to-chronam-admin,代码行数:20,代码来源:root.php


示例3: post_comment

function post_comment()
{
    $post = $_POST['idpost'];
    $source = $_SESSION['id'];
    if (strlen($_POST['content']) < 2) {
        header('Location: ../index.php?r=2');
        exit;
    }
    $content = $_POST['content'];
    $content = htmlentities($content);
    include database;
    $req = $connection->prepare("INSERT INTO comments (idpost, idusercible, content, timedate) VALUES (" . $post . ", " . $source . ", '" . $content . "', NOW());");
    $req->execute();
    $message = "Vous avez un nouveau commentaire sur l'un de vos posts";
    include 'users.php';
    $login = get_login($_POST['iduser']);
    $mail = get_mail_user($login);
    mail($mail, 'Camagru - Nouveau Commentaire', $message);
    header('Location: ../index.php?r=3#' . $post);
}
开发者ID:eleonorev,项目名称:camagru,代码行数:20,代码来源:comments.php


示例4: index

 function index()
 {
     if (!is_logged()) {
         redirect(base_url());
     }
     include APPPATH . "config/evote.php";
     $this->data['title'] = lang('off_vote');
     $text = icon('64x64/chart_up.png') . '<h2>Голосование на TOP EMUDEV</h2><p>После голосования нажмите получить бонус.</p><p>При простом голосовании вы получите <b>' . $config['normal'] . '</b> BP, 
     При смс голосе вы получите <b>' . $config['sms'] . '</b> BP.</p>';
     $smslink = str_replace('server', 'sms', $config['votelink']);
     $text .= icon('32x32/comment.png') . '<a href="' . $config['votelink'] . '" target="_blank">Голосовать</a>' . br(1);
     $text .= icon('32x32/sms.png') . '<a href="' . $smslink . '" target="_blank">Голосовать через SMS</a>' . br(1);
     $this->load->model('Account');
     $this->Account->login = get_login();
     $array = $this->Account->char_array();
     $form = form_dropdown('char', $array);
     $text .= form_open('evote/getbonus') . $form . form_submit('mysubmit', 'Получить бонус') . icon('32x32/note_accept.png') . form_close();
     $this->data['content'] = $text;
     compile();
 }
开发者ID:SelFish131,项目名称:rf_office,代码行数:20,代码来源:evote.php


示例5: initProgramlib

/**
 * @return void
 * @param
 * @param
 * @desc A generic function, that can be used by all programs. Does all the basic login stuff.
 */
function initProgramlib($ctype = null)
{
    global $gbl, $sgbl, $login, $ghtml;
    // /*
    // --- solution for some scripts running well in slave
    // REVERT - back to original
    if ($sgbl->is_this_slave()) {
        print "This is a Slave Server. Operate it at the Master server.\n";
        exit;
    }
    // */
    static $var = 0;
    $var++;
    $progname = $sgbl->__var_program_name;
    lfile_put_contents($sgbl->__var_error_file, "");
    set_exception_handler("lx_exception_handler");
    //xdebug_disable();
    set_error_handler("lx_error_handler");
    //setcookie("XDEBUG_SESSION", "sess");
    if ($var >= 2) {
        dprint("initProgramlib called twice \n <br> ");
    }
    if ($ctype === 'superadmin') {
        $sgbl->__var_dbf = $sgbl->__path_supernode_db;
        $sgbl->__path_admin_pass = $sgbl->__path_super_pass;
        $sgbl->__var_admin_user = $sgbl->__var_super_user;
        $login = new SuperClient(null, null, 'superadmin', 'login', 'forced');
        $login->get();
        return;
    } else {
        if ($ctype === "guest") {
            $login = new Client(null, null, "____________", "guest");
            $login->get();
            return;
        } else {
            if ($ctype != "") {
                $login = new Client(null, null, $ctype, "login", "forced");
                $login->get();
                return;
            }
        }
    }
    $sessobj = null;
    if ($ghtml->frm_consumedlogin === 'true') {
        $clientname = $_COOKIE["{$progname}-consumed-clientname"];
        $classname = $_COOKIE["{$progname}-consumed-classname"];
        $session_id = $_COOKIE["{$progname}-consumed-session-id"];
        get_login($classname, $clientname);
        $login->__session_id = $session_id;
        $sessobj = $login->getObject('ssession');
    } else {
        if (isset($_COOKIE["{$progname}-session-id"])) {
            $clientname = $_COOKIE["{$progname}-clientname"];
            $classname = $_COOKIE["{$progname}-classname"];
            $session_id = $_COOKIE["{$progname}-session-id"];
            if ($classname === 'superclient') {
                $sgbl->__var_dbf = $sgbl->__path_supernode_db;
                $sgbl->__path_admin_pass = $sgbl->__path_super_pass;
                $sgbl->__var_admin_user = $sgbl->__var_super_user;
            }
            if ($classname === 'slave') {
                $sgbl->__var_dbf = $sgbl->__path_slave_db;
            }
            if ($classname) {
                get_login($classname, $clientname);
                $login->__session_id = $session_id;
                $sessobj = $login->getObject('ssession');
            }
        }
    }
    if (!$sessobj || $sessobj->dbaction === 'add') {
        if ($ghtml->frm_ssl) {
            $ssl = unserialize(base64_decode($ghtml->frm_ssl));
            $string = $ssl['string'];
            $ssl_param = $ssl['ssl_param'];
            $encrypted_string = base64_decode($ssl['encrypted_string']);
            if (!$string || !checkPublicKey($string, $encrypted_string)) {
                print "SSL Connection Failed <br> \n";
                exit;
            }
            $class = 'client';
            $clientname = 'admin';
            get_login($class, $clientname);
            do_login($class, $clientname, $ssl_param);
            $sessobj = $gbl->c_session;
            $sessobj->write();
            $sessobj->dbaction = 'clean';
        }
    }
    //get_savedlogin($classname, $clientname);
    //print_time('login_get', "Login Get");
    //dprintr($login);
    //avoid some php warnings
    if (isset($login)) {
//.........这里部分代码省略.........
开发者ID:zseand,项目名称:kloxo,代码行数:101,代码来源:lxlib.php


示例6: session_start

<?php

const USER = 'user';
const PASS = 'password';
session_start();
switch ($_SERVER["REQUEST_METHOD"]) {
    case 'GET':
        get_login();
        break;
    case 'POST':
        post_login();
        break;
    case 'DELETE':
        delete_login();
        break;
    default:
        http_response_code(405);
        die;
}
function get_login()
{
    if ($_SESSION["loggedin"] == true) {
        echo json_encode(array('loggedin' => true, 'status' => 'logged in'));
    } else {
        echo json_encode(array('loggedin' => false, 'status' => 'not logged in'));
    }
}
function post_login()
{
    $data = json_decode(file_get_contents('php://input'));
    if (isset($data->user) && $data->user == USER && isset($data->password) && $data->password == PASS) {
开发者ID:jlauinger,项目名称:feedbackapp,代码行数:31,代码来源:login.php


示例7: session_start

session_start();
$masssending = new masssending();
if (empty($_SESSION['masssending_total_filesize'])) {
    $_SESSION['masssending_total_filesize'] = 0;
}
if (empty($_SESSION['masssending']['files'])) {
    $_SESSION['masssending']['files'] = array();
}
if (count($_SESSION['masssending']['files']) >= masssending::MAX_FILES) {
    $error = 'Максимальное кол-во прикрепленных файлов - ' . masssending::MAX_FILES;
} else {
    if ($_SESSION['masssending_total_filesize'] + $_FILES['attach']['size'] > masssending::MAX_FILE_SIZE) {
        $error = 'Максимальный объем прикрепленных файлов - ' . masssending::MAX_FILE_SIZE / (1024 * 1024) . ' Mб';
    } else {
        if ($uid = get_uid(false)) {
            $login = get_login($uid);
            $file = new CFile($_FILES['attach']);
            $file->table = 'file';
            $file->max_size = masssending::MAX_FILE_SIZE;
            $filename = $file->MoveUploadedFile("{$login}/contacts");
            $filetype = $file->getext();
            $error = $file->error;
        } else {
            $error = 'Вы не авторизованы';
        }
        if (!$file->id && !$error) {
            $error = 'Ошибка при загрузке файла. Пожалуйста, попробуйте еще раз.';
        }
        $masssending->AddFile($file->id, session_id());
    }
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:upload.php


示例8: get_login

<div class="b-layout__right b-layout__right_width_72ps b-layout__right_float_right">
        <h1 class="b-page__title b-page__title_padbot_30">Добро пожаловать на Free-lance.ru</h1>
</div>
<div class="b-layout__right b-layout__right_width_72ps b-layout__right_float_right">
    <div class="b-fon b-fon_inline-block b-fon_padbot_20">
            <div class="b-fon__body b-fon__body_pad_15  b-fon__body_padleft_30 b-fon__body_lineheight_18 b-fon__body_padright_40 b-fon__body_fontsize_13 b-fon__body_bg_f0ffdf">
            <span class="b-icon b-icon_sbr_gok b-icon_margleft_-25"></span>Вы успешно зарегистрированы, и теперь вам доступны все бесплатные функции сайта.
        </div>
    </div>

    <div class="b-layout__txt b-layout__txt_fontsize_22">&mdash; Перейти на <a class="b-layout__link" href="/">главную страницу</a></div>
    <div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_padleft_30 b-layout__txt_padbot_40">и начать самостоятельный поиск работы.</div>
    <div class="b-layout__txt b-layout__txt_fontsize_22">&mdash; Перейти в <a class="b-layout__link" href="/users/<?php 
echo get_login(get_uid(0));
?>
/">личный кабинет</a></div>
    <div class="b-layout__txt b-layout__txt_fontsize_11 b-layout__txt_padleft_30 b-layout__txt_padbot_40">указать профессиональную информацию и заполнить портфолио.</div>
</div>

<?php 
if (!empty($_SESSION['is_new_user'])) {
    unset($_SESSION['is_new_user']);
    ?>
<script language="javascript" src="http://www.everestjs.net/static/st.v2.js"></script>
<script language="javascript">
var ef_event_type="transaction";
var ef_transaction_properties = "ev_reg_worker=1&ev_reg_employer=0&ev_reg_worker_master=0&ev_reg_employer_master=0&ev_transid=<?php 
    echo md5($_SESSION['uid']);
    ?>
";
/*
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:tpl.welcome_free-lancer.php


示例9: AddMail

 /**
  * Добавить новую рассылку
  *
  * @param    string  $subject        тема email
  * @param    string  $message        текст email
  * @param    array   $attaches       прикрепленные файлы
  * @param    string  $contact_ids    идентификаторы получателей
  */
 function AddMail($subject, $message, $attaches, $contact_ids)
 {
     global $DB;
     $files = '';
     $fs = array();
     if ($attaches['file']) {
         $f = new CFile($attaches['file']);
         $f->max_size = 2097152;
         $dir = get_login(get_uid(false));
         $f_name = $f->MoveUploadedFile($dir . "/upload");
         array_push($fs, $f_name);
     }
     for ($i = 1; $i <= 5; $i++) {
         if ($attaches['file_' . $i]) {
             $f = new CFile($attaches['file_' . $i]);
             $f->max_size = 2097152;
             $dir = get_login(get_uid(false));
             $f_name = $f->MoveUploadedFile($dir . "/upload");
             array_push($fs, $f_name);
         }
     }
     if ($fs) {
         foreach ($fs as $v) {
             $files .= $v . ',';
         }
         $files = preg_replace("/,\$/", "", $files);
     }
     $sql = "INSERT INTO contacts_mails(subject,message,attaches,contact_ids,user_id) VALUES(?, ?, ?,? , ?i)";
     $DB->query($sql, pg_escape_string($subject), pg_escape_string(nl2br($message)), $files, $contact_ids, get_uid(false));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:38,代码来源:contacts.php


示例10: require_once

/****************************************************************/
// $Id$
if (!defined('AT_INCLUDE_PATH')) { exit; }

global $db;
global $_base_href, $msg, $_config;
$link_limit = 3;		// Number of links to be displayed on "detail view" box

require_once("bbb_api_conf.php");
require_once("bbb_api.php");

$bbb_joinURL;
$_moderatorPassword="mp";
$_attendeePassword="ap";   
$_logoutUrl= $_base_href.'index.php';
$username=get_login(intval($_SESSION["member_id"]));
$meetingID=$_SESSION['course_id'];
$bbb_welcome = _AT('bbb_welcome');
$salt = $_config['bbb_salt'];
$url = $_config['bbb_url']."/bigbluebutton/";

$response = BigBlueButton::createMeetingArray($username,$meetingID,$bbb_welcome, $_moderatorPassword,$_attendeePassword, $salt, $url,$_logoutUrl);

//Analyzes the bigbluebutton server's response
if(!$response){//If the server is unreachable
		$msg->addError("UNABLE_TO_CONNECT_TO_BBB");
}
else if( $response['returncode'] == 'FAILED' ) { //The meeting was not created
	if($response['messageKey'] == 'checksumError'){
		$msg->addError("CHECKSUM_ERROR_BBB");
	}
开发者ID:nishant1000,项目名称:BigBlueButton-module-for-ATutor,代码行数:31,代码来源:sublinks.php


示例11: array

 * ### NB per ora check non e' implementato ###
 * 
 */
if ($_GET['type'] === "student") {
    $alunni = array();
    // file di log
    $log_file = fopen("../tmp/studenti" . date("Ymd"), "w+");
    $index = 0;
    $incompleti = 0;
    $sel = "SELECT id_alunno, nome, cognome, username, password FROM alunni WHERE attivo = 1";
    $res = $db->execute($sel);
    while ($_alunno = $res->fetch_assoc()) {
        if ($_alunno['username'] == '') {
            $al = new Alunno($_alunno);
            $incompleti++;
            $al->username = get_login($db, $al->nome, $al->cognome);
            $al->password = get_password($al->nome, $al->cognome, &$al->clean_pwd);
            //print ($al->username).":".$al->password."<br/>";
            $upd = "UPDATE alunni SET username = '" . $al->username . "', password = '" . $al->password . "' WHERE id_alunno = " . $al->id_alunno;
            $r = $db->execute($upd);
            $str_log = $al->nome . " " . $al->cognome . ":" . $al->username . ":" . $al->password . ":" . $al->clean_pwd . "\n";
            fwrite($log_file, $str_log);
        }
    }
} else {
}
?>

<html>
<head>
<title>Creazione account</title>
开发者ID:jamleh,项目名称:e-schoolbook,代码行数:31,代码来源:accounts_maker.php


示例12: logout

    }
}
function logout()
{
    setcookie("auth", '', 0, "/");
    echo "Logged out";
}
if (!init_db(get_server_config())) {
    error_page("can't open DB");
}
$action = get_str("action", true);
if ($action == "login") {
    login_action();
    exit;
}
$source = get_login();
if (!$source) {
    login_page();
    exit;
}
switch ($action) {
    case 'edit_store_action':
        edit_store_action();
        break;
    case 'edit_store_form':
        edit_store_form();
        break;
    case 'file_search_action':
        file_search_action();
        break;
    case 'file_search_form':
开发者ID:pkgw,项目名称:hera-librarian,代码行数:31,代码来源:hl.php


示例13: GiftOrderedTarif

 /**
  * Взять заявки по определенному тарифу
  *
  * @param integer $bill_id  	   ИД оплаты
  * @param integer $gift_id  	   ИД подарка
  * @param integer $gid      	   ИД подарка
  * @param integer $fid      	   ИД пользователя
  * @param integer $transaction_id  ИД транзакции
  * @param integer $time            Время
  * @param integer $comments        Комментарий оплаты
  * @param integer $tarif           ИД Тарифа (см. таблицу op_codes)
  * @return array Данные выборки
  */
 function GiftOrderedTarif(&$bill_id, &$gift_id, $gid, $fid, $transaction_id, $time, $comments = "Аккаунт PRO  в подарок", $tarif = 52)
 {
     global $DB;
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/account.php";
     $account = new account();
     $error = $account->Gift($bill_id, $gift_id, $transaction_id, $tarif, $fid, $gid, "Все разделы", $comments, 10 * ($tarif == 52 || $tarif == 16 ? $time : 1));
     if (!$error) {
         $sql = "INSERT INTO orders (from_id, to_date, tarif, ordered, billing_id, payed) VALUES (?, ?, ?, true, ?, true)";
         if ($DB->query($sql, $gid, is_numeric($time) ? "{$time} month" : $time, $tarif, $bill_id)) {
             $login = get_login($gid);
             if ($gid == $_SESSION['uid'] && !is_pro()) {
                 $_SESSION['is_pro_new'] = 't';
             }
             if ($gid == $_SESSION['uid']) {
                 $pro_last = payed::ProLast($login);
                 $_SESSION['pro_last'] = $pro_last['freeze_to'] ? false : $pro_last['cnt'];
             } else {
                 $session = new session();
                 $session->UpdateProEndingDate($login);
             }
             return true;
         }
     }
     return false;
 }
开发者ID:amage,项目名称:fl-ru-damp,代码行数:38,代码来源:payed.php


示例14: date

$date2 = date('Y-m-d', strtotime($date2));
echo "<span class='heure'>" . $date2 . "</span>";
echo "<span class='texte'>" . $post['content'] . "</span>";
echo "<img src='" . $post['link'] . "'/>";
echo "<img class='pp' src='upload/profilpictures/" . get_pp($login) . "'/>";
echo "<a href='profile?login=" . $login . "'><span class='login'>" . $login . "</span></a>";
//echo "<span class='heure'> report content(" . $post['report'] .") </span>";
echo "<span class='like'>" . get_nblike($post['id']) . " likes - <span class='opencomments'>";
echo get_nb_comments($post['id']) . " comments </span></span>";
$comments = get_comments($post['id']);
echo "<div class='comments active'>";
foreach ($comments as $com) {
    $date = $com['timedate'];
    $date = date('d/m/Y', strtotime($date));
    echo "<div class='com'>";
    $user = get_login($com['idusercible']);
    echo "<div class='userinfos'><img class='pp' src='upload/profilpictures/" . get_pp($user) . "'/>";
    echo "<a href='profile?login=" . $login . "'><span class='login'> Par " . $user . " le " . $date . "</span></a> </div>";
    echo "<div class='texte'>" . $com['content'] . "</div>";
    echo "</div>";
}
if (isset($_SESSION['login'])) {
    ?>
    <form action="model/comments.php" name="commenter" method="post">
      <input type="hidden" name="idpost" value="<?php 
    echo $post['id'];
    ?>
"/>
      <input type="hidden" name="iduser" value="<?php 
    echo $post['iduser'];
    ?>
开发者ID:eleonorev,项目名称:camagru,代码行数:31,代码来源:post.php


示例15: UpdateFoto

 /**
  * Обновляет фото пользователя
  *
  * @param integer $fid               id пользователя
  * @param object $foto               файл фотографии
  * @param integer $del               флаг удаления фото (1 - удалить, 0 - перезакачаь)
  * @return string                    текст ошибки в случае неуспеха
  */
 function UpdateFoto($fid, $foto, $del)
 {
     // если юзер меняет аватар пока предыдущий еще не отмодерирован - будет история изменений
     $aChange = $GLOBALS['DB']->row("SELECT id, old_val, new_val FROM users_change WHERE user_id = ?i AND ucolumn = 'photo'", $fid);
     $aDelFile = array();
     // файлы которые нужно будет удалять сразу
     $dir = get_login($fid);
     $err = "";
     if (!$dir) {
         $error = "Имя пользователя не определено";
     }
     $this->photo = $this->GetField($fid, $err, "photo");
     $old_foto = $this->photo;
     $error .= $err;
     if ($del == 1) {
         $this->photo = "";
     } else {
         if ($foto && !$error) {
             $foto->max_size = 102400000;
             $foto->max_image_size = array('width' => 100, 'height' => 100, 'less' => 0);
             $foto->resize = 1;
             $foto->proportional = 1;
             $foto->topfill = 1;
             $cFile->crop = 1;
             $foto->allowed_ext = array_diff($GLOBALS['graf_array'], array('swf', 'gif'));
             $this->photo = $foto->MoveUploadedFile($dir . "/foto");
             $error .= $foto->StrError('<br />');
             if (!$error && !$foto->img_to_small("sm_" . $this->photo, array('width' => 50, 'height' => 50))) {
                 $error .= "Невозможно уменьшить картинку.";
             }
         }
     }
     if (!$error) {
         $error .= $this->Update($fid, $res);
         // определяемся какие файлы нужно удалить
         if ($del == 1) {
             // удаляем аватар
             if ($aChange) {
                 // если хранили версии аватара на случай возврата - то грохаем обе
                 if ($aChange['old_val']) {
                     $aDelFile[] = $aChange['old_val'];
                 }
                 $aDelFile[] = $aChange['new_val'];
             } else {
                 // иначе просто грохаем аватар
                 $aDelFile[] = $old_foto;
             }
         } elseif ($foto) {
             // меняем аватар
             if ($aChange && $aChange['new_val']) {
                 // грохаем только промежуточную версию, если была
                 $aDelFile[] = $aChange['new_val'];
             }
         }
     }
     // удаление не нужных файлов (если нет ошибок при сохранении разумеется)
     if ($aDelFile && !$error) {
         foreach ($aDelFile as $file) {
             $foto->Delete(0, "users/" . substr($dir, 0, 2) . "/" . $dir . "/foto/", $file);
             $foto->Delete(0, "users/" . substr($dir, 0, 2) . "/" . $dir . "/foto/", "sm_" . $file);
         }
     }
     return $error;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:72,代码来源:users.php


示例16: print_index

function print_index()
{
    global $gbl, $sgbl, $ghtml, $login;
    ob_start();
    print_time('index');
    $cgi_clientname = $ghtml->frm_clientname;
    Htmllib::checkForScript($cgi_clientname);
    $cgi_class = $ghtml->frm_class;
    if (!$cgi_class) {
        $cgi_class = getClassFromName($cgi_clientname);
    }
    $cgi_password = $ghtml->frm_password;
    $cgi_forgotpwd = $ghtml->frm_forgotpwd;
    $cgi_email = $ghtml->frm_email;
    $cgi_key = $ghtml->frm_login_key;
    if (!$cgi_password || !$cgi_clientname) {
        $ghtml->print_redirect("/login/?frm_emessage=login_error");
    }
    $cgi_classname = 'client';
    if ($cgi_class) {
        $cgi_classname = $cgi_class;
    }
    if ($cgi_clientname == "" || $cgi_password == "" && $cgi_key == "") {
        $cgi_forgotpwd = $ghtml->frm_forgotpwd;
        return;
    }
    $ip = $_SERVER['REMOTE_ADDR'];
    if (!check_login_success($cgi_classname, $cgi_clientname, $cgi_password, $cgi_key)) {
        return;
    }
    log_log("login_success", "Successful Login to {$cgi_clientname} from " . $_SERVER['REMOTE_ADDR']);
    /*
    	try {
    		$att = $gbl->g->getFromList("loginattempt", $ip);
    		$att->delete();
    } catch (Exception $e) {
    }
    */
    if (check_disable_admin($cgi_clientname)) {
        $ghtml->print_redirect("/login/?frm_emessage=login_error");
        exit;
    }
    if (get_login($cgi_classname, $cgi_clientname)) {
        do_login($cgi_classname, $cgi_clientname);
        $login->was();
        check_blocked_ip();
        $ghtml->print_redirect("/");
    } else {
        $ghtml->cgiset("frm_emessage", "login_error");
    }
    $cgi_forgotpwd = $ghtml->frm_forgotpwd;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:52,代码来源:index.php


示例17: chararray

function chararray($login = '')
{
    if ($login == '') {
        $login = get_login();
    }
    $CI =& get_instance();
    $char = array();
    $query = $CI->MSSQL->query("SELECT Serial,Name FROM " . get_world() . ".dbo.tbl_base WHERE Account='{$login}' AND DCK=0");
    if ($query->num_rows() > 0) {
        foreach ($query->result() as $row) {
            $char[$row->Serial] = $row->Name;
        }
        //for
    } else {
        return false;
    }
    //if
    return $char;
}
开发者ID:SelFish131,项目名称:rf_office,代码行数:19,代码来源:rf_framework_helper.php


示例18: openlevel


//.........这里部分代码省略.........
            if (isset($blog->thread) && is_array($blog->thread) && count($blog->thread) > 0) {
                $buser_id = $blog->thread;
                $buser_id = array_pop($buser_id);
                $buser_id = $buser_id['fromuser_id'];
            }
            if ($blog->deluser_id == $blog->fromuser_id) {
                $ret .= '<br><br>Комментарий удален автором ' . date("[d.m.Y | H:i]", strtotimeEx($blog->deleted));
            } elseif ($blog->deluser_id == $buser_id) {
                $ret .= '<br><br>Комментарий удален автором темы ' . date("[d.m.Y | H:i]", strtotimeEx($blog->deleted));
            } else {
                $ret .= '<br><br>Комментарий удален модератором';
                if (!$mod) {
                    $ret .= '( ';
                    $del_user = $user->GetName($blog->deluser_id, $err);
                    $ret .= $del_user['login'] . ' : ' . $del_user['usurname'] . ' ' . $del_user['uname'];
                    $ret .= ' ) ';
                }
                $ret .= date("[d.m.Y | H:i]", strtotimeEx($blog->deleted));
            }
            $ret .= '<br><br>';
        } else {
            if ($blog->modified) {
                $ret .= '&nbsp; &nbsp;';
                if ($blog->modified_id == $blog->fromuser_id) {
                    $ret .= '[внесены изменения: ' . date("d.m.Y | H:i]", strtotimeEx($blog->modified));
                } else {
                    $ret .= 'Отредактировано модератором';
                    if (!$mod) {
                        $ret .= '( ';
                        $mod_user = $user->GetName($blog->modified_id, $err);
                        $ret .= $mod_user['login'] . ' : ' . $mod_user['usurname'] . ' ' . $mod_user['uname'];
                        $ret .= ' ) ';
                    }
                    $ret .= ' ' . date("[d.m.Y | H:i]", strtotimeEx($blog->modified));
                }
            }
            $ret .= '<br>';
            if ($winner == $blog->id) {
                $ret .= '<font color="#000099" style="font-size:20px">Победитель</font>';
            }
            $ret .= '<br>';
            if ($blog->new == 't') {
                $ret .= '<img src="/images/ico_new_blog.gif" alt="" width="44" height="12" border="0"><br>';
            }
            if ($blog->title) {
                $ret .= ' <font class="bl_name">';
                if ($blog->login == "Anonymous") {
                    list($name, $mail) = sscanf($blog->title, "%s @@@: %s");
                    $ret .= $name . " " . $mail;
                } else {
                    $ret .= reformat($blog->title, 30);
                }
                $ret .= '</font><br>';
            }
            $ret .= reformat($blog->msgtext, 50) . '<br>';
            if ($blog->attach) {
                if ($file) {
                    $ret .= "<br>" . $str . "<br>";
                } else {
                    $ret .= "</td></tr><tr class=\"qpr\"><td colspan=\"2\"><br>" . $str;
                }
            }
            $ret .= '<br>';
            if ($gr_base == 5 && !$winner && $parent_login == $_SESSION['login']) {
                $ret .= "<input type=\"submit\" name=\"btn\" value=\"Это победитель\" onClick=\"if (warning(0)) window.location.replace('./view.php?tr=" . $thread . "&ord='.{$ord}.'&winner=" . $blog->id . "'); else return false;\">";
            }
            $ret .= '<div style="color: #D75A29;font-size:9px;';
            if ($blog->attach && !$file) {
                $ret .= ' padding-left: ' . ($padding + 60) . 'px;';
            }
            $ret .= '">';
            if ($blog->login == $_SESSION['login'] || $parent_login == $_SESSION['login'] || $allow_del || !$mod) {
                $ret .= ' <a href="' . $form_uri . '?id=' . $blog->id . '&amp;action=delete&ord=' . $ord . '" style="color: #D75A29;" onclick="return warning(1);">Удалить</a> |';
            }
            if ($blog->login == $_SESSION['login'] || !$mod) {
                $ret .= '<a href="' . $form_uri . '?id=' . $blog->id . '&amp;action=edit&ord=' . $ord . '&amp;tr=' . $thread . '" style="color: #D75A29;">Редактировать</a> |';
            }
            $ret .= "<a href=\"javascript: void(0);\" onclick=\"javascript: answer('" . $blog->id . "', '" . ($blog->attach ? $blog->attach : '') . "', '" . get_login($_SESSION["uid"]) . "'); document.getElementById('frm').olduser.value = '" . $_SESSION["uid"] . "'; \" ";
            $ret .= 'style="color: #D75A29">Комментировать</a> |
  			<a href="/blogs/view.php' . "?tr=" . $blog_thread . ($thispage ? "&pagefrom=" . $thispage : "") . "&openlevel=" . $blog->id . "&ord=" . $ord . "#o" . $blog->id . '" style="color: #D75A29">Ссылка</a> 
  			</div>
						</td>
		</tr>
		<tr';
            if (!$blog->level || $lastlink == $blog->id) {
                $ret .= ' class="qpr"';
            }
            $ret .= '><td colspan="2" ><br></td></tr>
		</table>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr class="n_qpr"><td colspan="3" id="form' . $blog->id . '">';
            if ($blog->id == $edit_id && ($blog->login == $_SESSION['login'] || !$mod)) {
                $ret .= "\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\">\n\t\t\t<!--\n\t\t\tanswer(" . $blog->id . ", '" . ($blog->attach ? $blog->attach : '') . "', '" . get_login($_SESSION["uid"]) . "');\n\t\t\tdocument.getElementById('frm').olduser.value = '" . $_SESSION["uid"] . "';\n\t\t\tdocument.getElementById('frm').msg_name.value = '" . $error_flag ? input_ref_scr($msg_name) : input_ref_scr($blog->title) . "';\n\t\t\tdocument.getElementById('frm').msg.value = '" . $error_flag ? input_ref_scr($msg) : input_ref_scr($blog->msgtext) . "';\n\t\t\tdocument.getElementById('frm').btn.value = 'Сохранить';\n\t\t\tdocument.getElementById('frm').action.value = 'change';\n\t\t\t//-->\n\t\t\t</script>";
            }
        }
        $ret .= "</td></tr>\n\t\t</table>";
    }
    $objResponse->assign($begin, "innerHTML", $ret);
    return $objResponse;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:101,代码来源:blogs.server.php


示例19: InGetPost

$is_adm = false;
// чтобы админ мог редактировать предложения по проектам
if (hasPermissions('projects') && InGetPost('uid')) {
    $uid = InGetPost('uid');
    $is_pro = payed::checkProByUid($uid);
    $is_adm = true;
}
$error = false;
$err = '';
$pict_added = false;
//die ("DUMP: " . var_export($_FILES, true));
if (isset($_POST['action']) && $_POST['action'] == 'add_pic' && is_array($_FILES['ps_attach'])) {
    $prj_id = isset($_POST['pid']) ? intval($_POST['pid']) : 0;
    $img = new CFile($_FILES['ps_attach']);
    if ($img->size > 0) {
        $dir = get_login($uid);
        // чтобы админ мог редактировать предложения по проектам
        if ($is_adm) {
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
            $user = new users();
            $user->GetUserByUID($uid);
            $dir = $user->login;
        }
        $img->max_size = 2097152;
        $img->proportional = 1;
        $pictname = $img->MoveUploadedFile($dir . "/upload");
        $mid = $img->id;
        if (!isNulArray($img->error)) {
            if ($img->size > $img->max_size) {
                $err = 'Недопустимый размер файла';
            }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:upload.php


示例20: UpdateLogo

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_login_cookie_hash函数代码示例发布时间:2022-05-15
下一篇:
PHP get_loggedin_userid函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap