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


PHP CheckUser函数代码示例

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


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

示例1: htmlspecialchars

     break;
 case 'save_pers':
     $persons_id = $_REQUEST['id'];
     $name = htmlspecialchars($_REQUEST['n'], ENT_QUOTES);
     $tin = $_REQUEST['t'];
     $position = $_REQUEST['p'];
     $address = htmlspecialchars($_REQUEST['a'], ENT_QUOTES);
     $image = $_REQUEST['img'];
     $password = $_REQUEST['pas'];
     $home_number = $_REQUEST['h_n'];
     $mobile_number = $_REQUEST['m_n'];
     $comment = $_REQUEST['comm'];
     $user = $_REQUEST['user'];
     $userpassword = md5($_REQUEST['userp']);
     $group_permission = $_REQUEST['gp'];
     $CheckUser = CheckUser($user);
     if (empty($persons_id)) {
         if ($CheckUser) {
             AddWorker($user_id, $name, $tin, $position, $address, $image, $password, $home_number, $mobile_number, $comment, $user, $userpassword, $group_permission);
         } else {
             $error = "მომხმარებელი ასეთი სახელით  უკვე არსებობს\nაირჩიეთ სხვა მომხმარებლის სახელი";
         }
     } else {
         SaveWorker($persons_id, $user_id, $name, $tin, $position, $address, $image, $password, $home_number, $mobile_number, $comment, $user, $userpassword, $group_permission);
     }
     break;
 case 'save_group':
     $group_name = $_REQUEST['nam'];
     $group_pages = json_decode(stripslashes($_REQUEST['pag']));
     $data = array('inserted_value' => SaveGroup($group_name, $group_pages), 'inserted_name' => $group_name);
     global $log;
开发者ID:GeoPvN,项目名称:winstone,代码行数:31,代码来源:user.action.php

示例2: CheckUser

	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once "../include/phprechnung.inc.php";
require_once "../include/smarty.inc.php";
CheckUser();
CheckAdminGroup3();
CheckSession();
$ArrayValue = CheckArrayValue($_REQUEST);
foreach ($ArrayValue as $key => $val) {
    ${$key} = $val;
    $smarty->assign("{$key}", $val);
}
if (!isset($page) || !is_numeric($page) || $page <= 0) {
    $page = 1;
}
if (!isset($Sort) || $Sort !== 'ASC' && $Sort !== 'DESC') {
    $Sort = "";
}
if (empty($Order) || $Order !== 'CASHBOOKID' && $Order !== 'TAKINGS' && $Order !== 'EXPENDITURES' && $Order !== 'CASH_IN_HAND' && $Order !== 'CASHBOOK_DATE' && $Order !== 'DESCRIPTION') {
    $Order = "CASHBOOK_DATE DESC,CASHBOOKID DESC";
开发者ID:kreapptivo,项目名称:phprechnung,代码行数:31,代码来源:searchlist.php

示例3: session_start

<?php

echo 'add Fields<br>';
include './connector.php';
session_start();
//Εμφάνηση ώρα Ελλάδος
date_default_timezone_set('Europe/Athens');
$Connector = new Connector();
$NumOfFieldsToAdd = 0;
$NameOfLogin = $_SESSION['NameOfLogin'];
$SurnameOfLogin = $_SESSION['SurnameOfLogin'];
$ProgrammThatUserClick = $_SESSION['ProgrammThatUserClick'];
$description = "Ο/Η χρήστης (ον) " . $_SESSION['NameOfLogin'] . " (επ) " . $_SESSION['SurnameOfLogin'] . " εκτέλεσε την λειτουργία " . "" . $_SESSION['AntistoixoKoumpi'] . " με την οποία πρόσθεσε " . $NumOfFieldsToAdd . " πεδία. . Η " . $_SESSION['AntistoixoKoumpi'] . " πραγματοποιήθηκε στις " . "" . ConvertEnglishDaysAndMonthToGreek(date("l jS \\of F Y")) . " και ώρα " . date("h:i:s") . "" . ". Ο χρήστης με (ον) " . $_SESSION['NameOfLogin'] . " και (επ) " . $_SESSION['SurnameOfLogin'] . " χαρακτιρίζεται ως " . CheckUser() . ".";
$res = $Connector->prepare("INSERT INTO history VALUES('{$NameOfLogin}', '{$SurnameOfLogin}', '{$ProgrammThatUserClick}','{$description}')");
function CheckUser()
{
    $User = null;
    if ($_SESSION['Permissions'] == 0) {
        $User = "user";
    }
    if ($_SESSION['Permissions'] == 1) {
        $User = "admin";
    }
    if ($_SESSION['Permissions'] == 2) {
        $User = "topuser";
    }
    return $User;
}
function ConvertEnglishDaysAndMonthToGreek($date)
{
    $DaysOfWeekInGeekArray = array(0 => "Δευτέρα", 1 => "Τρίτη", 2 => "Τετάρτη", 3 => "Πέμπτη", 4 => "Παρασκευή", 5 => "Σάββατο", 6 => "Κυριακή");
开发者ID:GeorgeKaraxalios,项目名称:Management-of-Employees,代码行数:31,代码来源:ProthikiPedion.php

示例4: ConvertEnglishDaysAndMonthToGreek

//        return $NewFileUpload;
//    }
//    if (mb_detect_encoding($StringToConvert) == "UTF-8")
//    {
//        //print_r(iconv_get_encoding("all"));
//        $NewFileUpload = iconv("utf-8", "iso-8859-7", $StringToConvert);
//        echo "NewFileUpload Inside Function = ".$NewFileUpload."<br>";
//        return $NewFileUpload;
//    }
//}
$_SESSION['SaveImageToDocForeground'] = "{$PathToSaveForegroundImage}";
$_SESSION['SaveImageToDocBackground'] = "{$PathToSaveBackgroundImage}";
$NameOfLogin = $_SESSION['NameOfLogin'];
$SurnameOfLogin = $_SESSION['SurnameOfLogin'];
$ProgrammThatUserClick = $_SESSION['ProgrammThatUserClick'];
$description = "Ο/Η χρήστης (ον) " . $_SESSION['NameOfLogin'] . " (επ) " . $_SESSION['SurnameOfLogin'] . " εκτέλεσε την λειτουργία " . "" . $_SESSION['Ektiposikartas'] . " για τον υπάλληλο με (ον) " . $_SESSION["NameOfEmployee"] . " και (επ) " . $_SESSION['SurnameOfEmployee'] . "" . ".Η " . $_SESSION['Ektiposikartas'] . " του επιλεγμένου υπαλλήλου, πραγματοποιήθηκε στις " . ConvertEnglishDaysAndMonthToGreek(date("l jS \\of F Y")) . " και ώρα " . date("h:i:s") . ". Ο χρήστης με (ον) " . $_SESSION['NameOfLogin'] . " και (επ) " . $_SESSION['SurnameOfLogin'] . "" . " χαρακτιρίζεται ως " . CheckUser() . ".";
$res = $con->prepare("INSERT INTO history VALUES('{$NameOfLogin}', '{$SurnameOfLogin}', '{$ProgrammThatUserClick}','{$description}')");
function GreekStringToUppercase($string)
{
    $string = strtoupper($string);
    $letters = array('α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω');
    $letters_accent = array('ά', 'έ', 'ή', 'ί', 'ό', 'ύ', 'ώ');
    $letters_upper_accent = array('Ά', 'Έ', 'Ή', 'Ί', 'Ό', 'Ύ', 'Ώ');
    $letters_upper_solvents = array('ϊ', 'ϋ');
    $letters_other = array('ς');
    $letters_to_uppercase = array('Α', 'Β', 'Γ', 'Δ', 'Ε', 'Ζ', 'Η', 'Θ', 'Ι', 'Κ', 'Λ', 'Μ', 'Ν', 'Ξ', 'Ο', 'Π', 'Ρ', 'Σ', 'Τ', 'Υ', 'Φ', 'Χ', 'Ψ', 'Ω');
    $letters_accent_to_uppercase = array('Α', 'Ε', 'Η', 'Ι', 'Ο', 'Υ', 'Ω');
    $letters_upper_accent_to_uppercase = array('Α', 'Ε', 'Η', 'Ι', 'Ο', 'Υ', 'Ω');
    $letters_upper_solvents_to_uppercase = array('Ι', 'Υ');
    $letters_other_to_uppercase = array('Σ');
    $lowercase = array_merge($letters, $letters_accent, $letters_upper_accent, $letters_upper_solvents, $letters_other);
开发者ID:GeorgeKaraxalios,项目名称:Management-of-Employees,代码行数:31,代码来源:AddExternalInfo.php

示例5: extract

 <table width="720" border="0" cellspacing="0" cellpadding="0">
   <tr>
     <td width="218" height="226" align="center" valign="middle"><img src="images/logo_admin.jpg" width="198" height="181"  alt=""/></td>
     <td width="502" align="center" valign="top">
     <table width="502" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td height="42" align="left" valign="top">
             <!--  Login Section Start -->
             <?php 
                 if ($_REQUEST['user_cred'] == '1')
                 {
                     extract($_POST);    
                     $user = mysql_real_escape_string($username);
                     $pass = base64_encode($password);
                     if($user != '' && $pass != ''){
                     $check_user = CheckUser($user,$pass);
                     if(count($check_user) > 0)
                         {
                         $_SESSION['admin_user_id']   = $check_user[0]['id'];
                         $_SESSION['admin_user_name'] = $check_user[0]['user_name']; 
                         $_SESSION['admin_user_type'] = $check_user[0]['type']; 
                         header("Location:open_orders.php");
                         exit;
                         }
                     else 
                         {
                     ?>
                         <div id="alert1" class="alert">Username and password are mismatch.</div>      
                     <?php
                         }
                         }  
开发者ID:njassim,项目名称:SOHO_REPRO,代码行数:31,代码来源:index777.php

示例6: FindbyUserId

<?php

include_once '../BLL/userBll.php';
if (isset($_POST["submit"]) && $_POST["submit"] == "登录") {
    $user = $_POST["username"];
    $psw = $_POST["password"];
    if ($user == "" || $psw == "") {
        echo "<script>alert('请输入用户名或密码!'); history.go(-1);</script>";
    } else {
        if (CheckUser($user, $psw)) {
            $result = FindbyUserId($user);
            $authority = $result[0][5];
            $userId = $result[0][0];
            session_start();
            $_SESSION['userID'] = $userId;
            //echo "success!!";
            if ($authority == 2) {
                echo "<script>window.location.href = '../UIL/ManageIndex.php';</script>";
            } else {
                $identify = $result[0][4];
                if ($identify == '') {
                    echo "<script>window.location.href = 'http://2.whoisyourdaddy.sinaapp.com/index.php?s=/addon/WeiSite/WeiSite/index/publicid/154.html';</script>";
                } else {
                    echo "<script>window.location.href = 'http://2.whoisyourdaddy.sinaapp.com/index.php?s=/addon/WeiSite/WeiSite/index/publicid/154.html';</script>";
                }
            }
        } else {
            echo "<script>alert('wrong password!');history.go(-1);</script>";
        }
    }
} else {
开发者ID:sniperking1234,项目名称:WexinPublic,代码行数:31,代码来源:loginCheckAction.php

示例7: substr

        //                            echo "Sum position: ".$ValueOfBranchThatUserEnterBranchSinolikesThesis."<br>";
        //                            echo "<strong><font size='4'>Η επεξεργασία πληροφοριών έγιναν με επιτυχία!!</font></strong><br>";
        $res = $con->prepare("Update {$TableOfChangeService} Set piasmenes_thesis={$OldValueOfChangeBranchPiasmenesThesis}, eleutheres_thesis={$OldValueOfChangeBranchEleutheresThesis}, sinolikes_thesis={$OldValueOfChangeBranchSinolikesThesis} Where value='{$ChangeBranch}'");
        $res->execute();
        $res1 = $con->prepare("Update {$TableOfServiceThatUserEnter} Set piasmenes_thesis={$ValueOfBranchThatUserEnterPiasmenesThesis}, eleutheres_thesis={$ValueOfBranchThatUserEnterEleutheresThesis}, sinolikes_thesis={$ValueOfBranchThatUserEnterBranchSinolikesThesis} Where value='{$BranchThatUserEnter}'");
        $res1->execute();
    }
    $NameOfLogin = $_SESSION['NameOfLogin'];
    $SurnameOfLogin = $_SESSION['SurnameOfLogin'];
    $ProgrammThatUserClick = $_SESSION['ProgrammThatUserClick'];
    $description = "Ο/Η χρήστης (ον) " . $_SESSION['NameOfLogin'] . " (επ) " . $_SESSION['SurnameOfLogin'] . " εκτέλεσε την λειτουργία " . $_SESSION['AntistoixoKoumpi'] . " του υπαλλήλου με (ον) " . $Name . " και (επ) " . $Surname . " με την οποία ζήτησε την αλλαγή των εξής πεδίων: ";
    for ($i = 0; $i < $_SESSION['MetablitiGiaTaPosaPediaAllaxtikan']; $i++) {
        $description = $description . $_SESSION['PediaGiaAllagi' . $i] . ", ";
    }
    $description = substr($description, 0, -2);
    $description = $description . ". H " . $_SESSION['AntistoixoKoumpi'] . " πραγματοποιήθηκε στις " . ConvertEnglishDaysAndMonthToGreek(date("l jS \\of F Y")) . " " . "και ώρα " . date("h:i:s") . ". Ο χρήστης (ον) " . $NameOfLogin . " (επ) " . $SurnameOfLogin . " χαρακτηρίζεται ως " . CheckUser() . ".";
    $res = $con->prepare("INSERT INTO history VALUES('{$NameOfLogin}', '{$SurnameOfLogin}', '{$ProgrammThatUserClick}','{$description}')");
    ?>
                        <button type="submit" name="MainPage" id="MainPage" onclick="window.location.href='index.php'">Αρχική</button>
                    <?php 
}
function domain_exists($email, $record = 'MX')
{
    list($user, $domain) = split('@', $email);
    return checkdnsrr($domain, $record);
}
function check_email_address($email)
{
    // First, we check that there's one @ symbol, and that the lengths are right
    if (!ereg("^[^@]{1,64}@[^@]{1,255}\$", $email)) {
        // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
开发者ID:GeorgeKaraxalios,项目名称:Management-of-Employees,代码行数:31,代码来源:UpdateInfo.php

示例8: ReadItemDesc

function ReadItemDesc($path, $ptr, &$xmlbuffer)
{
    if (!extension_loaded('dmopr')) {
        if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) {
            dl('php_dmoprmod.dll');
        } else {
            dl('dmopr.so');
        }
    }
    $oprarg = "getdesc " . $path . "|" . $ptr;
    $buf2 = dmopr($oprarg);
    $xmlbuffer = $buf2;
    $itemperm = GetXMLField("dmaccess", $xmlbuffer);
    if ($itemperm != "") {
        $rc = CheckUser($itemperm);
        if ($rc == 0) {
            $xmlbuffer = "";
        }
    } else {
        $rc = 1;
    }
    if ($xmlbuffer == "") {
        return -1;
    } else {
        return $rc;
    }
}
开发者ID:JillArnold,项目名称:dnr-ContentDM,代码行数:27,代码来源:DMSystem.php

示例9: die

                echo '<span style="color:red;text-align:center;">Δεν υπάρχουν διαθέσιμες θέσεις για τον κλάδο που επιλέξατε</span>' . "<br>";
                die("<strong><font size='4'>Η εφαρμογή τερματίστηκε λόγω των παραπάνω λόγων!Παρακαλώ για την σωστή λειτουργία της εφαρμογής πατήσε το κουμπί 'Επαναφώρτωση σελίδας'</font></strong>");
            }
        } else {
        }
        $res = $con->prepare("INSERT INTO kataxorisiuser(Name,SurName,PoliceID,NameOfFather,NameOfMother,DayOfBorn,Situation," . "EmploymentRelationship,DateOfUptake," . "AFM,Specialty,Phone,Service,AMKA,NumberIdentificationIKA,Age,MK,Grade,Address,Section,email,branch,NumberIdentificationEmployee,CardPOL,DriveLicense) VALUE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", array($name, $surname, $PoliceID, $NameOfFather, $NameOfMother, $DateOfBorn, $Situation, $RelationshipOfWork, $DateOfUptake, $AFM, $Specialty, $Phone, $Service, $AMKA, $NumberIdentificationIKA, $Age, $NumsFor0To6, $GradeSelection, $Address, $Section, $Email, $Node, $NumberIdentificationEmployee, $CardPOL, $DriveLicense));
        $res = $con->prepare("INSERT INTO yaape_for_each_employee (name,Surname,YAAPE,YAAPE_HOURS,YAATE) VALUES(?,?,?,?,?)", array($name, $surname, $_POST['YAAPEText'], '0', $_POST['CaseinΥearText']));
        $res = $con->prepare("INSERT INTO yaape_for_each_employee_backup (name,Surname,YAAPE,YAAPE_HOURS,YAATE) VALUES(?,?,?,?,?)", array($name, $surname, $_POST['YAAPEText'], '0', $_POST['CaseinΥearText']));
        $res2 = $con2->prepare("INSERT INTO kataxorisi_adeion (Name, Surname) VALUES('{$name}','{$surname}')");
        $res2 = $con2->prepare("INSERT INTO kataxorisi_adeion_backup (Name, Surname) VALUES('{$name}','{$surname}')");
        if ($res) {
            $NameOfLogin = $_SESSION['NameOfLogin'];
            $SurnameOfLogin = $_SESSION['SurnameOfLogin'];
            $ProgrammThatUserClick = $_SESSION['ProgrammThatUserClick'];
            echo "<strong><font size='4'>Επιτυχής καταχώρηση υπαλλήλου!!</font></strong>" . "<br>";
            $description = "Ο/Η χρήστης (ον) " . $_SESSION['NameOfLogin'] . " (επ) " . $_SESSION['SurnameOfLogin'] . " εκτέλεσε την λειτουργία " . $_SESSION['AntistoixoKoumpi'] . "με την οποία καταχώρησε τον/την υπάλληλο (ον) " . $name . " (επ) " . $surname . ". H " . $_SESSION['AntistoixoKoumpi'] . " πραγματοποιήθηκε στις " . ConvertEnglishDaysAndMonthToGreek(date("l jS \\of F Y")) . " " . "και ώρα " . date("h:i:s") . ". Ο χρήστης (ον) " . $NameOfLogin . " (επ) " . $SurnameOfLogin . " " . "χαρακτηρίζεται ως " . CheckUser() . ".";
            $res = $con->prepare("INSERT INTO history VALUES('{$NameOfLogin}', '{$SurnameOfLogin}', '{$ProgrammThatUserClick}','{$description}')");
        } else {
            echo "<strong><font size='4'>Παρουσιάστηκε πρόβλημα με την καταχώρηση υπαλλήλου!!Παρακαλώ επικοινωνίστε με τον διαχειριστή για επίλυση του προβλήματος</font></strong>" . "<br>";
        }
    }
}
function CheckUser()
{
    $User = null;
    if ($_SESSION['Permissions'] == 0) {
        $User = "user";
    }
    if ($_SESSION['Permissions'] == 1) {
        $User = "admin";
    }
开发者ID:GeorgeKaraxalios,项目名称:Management-of-Employees,代码行数:31,代码来源:KataxorisiProsopikou.php


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