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

PHP SessionUtil类代码示例

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

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



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

示例1: FlashChatBridge_user_showChat

function FlashChatBridge_user_showChat()
{
    // perform permission check
    if (!SecurityUtil::checkPermission('FlashChatBridge::', '::', ACCESS_READ)) {
        return LogUtil::registerPermissionError();
    }
    $popup = FormUtil::getPassedValue('popup', false);
    // Security check
    $render =& pnRender::getInstance('FlashChatBridge', false);
    $UserVars = pnUserGetVars(SessionUtil::getVar('uid'));
    $client_type = FormUtil::getPassedValue('client_type', 'standard');
    $settings = pnModGetVar('FlashChatBridge');
    $settings['init_user'] = $UserVars['uname'];
    $settings['init_password'] = $UserVars['pass'];
    if ($settings['autosize'] == 1) {
        $settings['width'] = "100%";
        $settings['height'] = "100%";
    }
    if ($popup) {
        $settings['width'] = "100%";
        $settings['height'] = "100%";
        $render->assign('settings', $settings);
        $chat = $render->fetch("flashchatbridge_user_chat_{$client_type}.htm");
        $render->assign('chat', $chat);
        echo $render->fetch('flashchatbridge_user_popup.htm');
        exit;
    } else {
        $render->assign('settings', $settings);
        return $render->fetch("flashchatbridge_user_chat_{$client_type}.htm");
    }
}
开发者ID:tempbottle,项目名称:FlashChatBridge,代码行数:31,代码来源:pnuser.php


示例2: index

 public function index()
 {
     echo "{" + "name" + ":" + "huangzhen" + "," + "age" + ":" + "23" + "}";
     if ('6' == SessionUtil::get('user_id')) {
         echo 'fuck';
     }
 }
开发者ID:Diaosir,项目名称:ziku,代码行数:7,代码来源:test_c.php


示例3: handleForm

 public function handleForm(Context $context, $action)
 {
     if ($action == "createReservation") {
         if (isset($_POST['equip_id']) && $_POST['equip_id'] != "" && (isset($_POST['start_date']) && $_POST['start_date'] != "") && (isset($_POST['length']) && $_POST['length'] != "")) {
             $equipId = $_POST['equip_id'];
             $equip = EquipmentDao::getEquipmentByID($equipId);
             if ($equip != null) {
                 if (SessionUtil::getUserlevel() >= $equip->minUserLevel) {
                     $startDate = $_POST['start_date'];
                     $endDate = DateUtil::incrementDate($startDate, $_POST['length']);
                     $reservations = ReservationDao::getReservationsForEquipmentByDate($equipId, $startDate, $endDate);
                     if (count($reservations) == 0) {
                         $user = UserDao::getUserByUsername(SessionUtil::getUsername());
                         $reservation = ReservationDao::createReservation($user->id, $equipId, $_POST['length'], $startDate, $endDate, $_POST['user_comment']);
                         EmailUtil::sendNewReservationNotices($user, $reservation);
                     } else {
                         $context->addError("Reservations already exist during selected dates ({$startDate} and {$endDate}).");
                     }
                 } else {
                     $context->addError("Cannot reserve equipment (User Level).");
                 }
             } else {
                 $context->addError("No such equipment.");
             }
         } else {
             $context->addError("Required Field Left Blank.");
         }
     } else {
         $context->addError("Incorrect Action.");
     }
 }
开发者ID:ramielrowe,项目名称:Reservation-System-V2,代码行数:31,代码来源:PlaceReservationHandler.php


示例4: __toString

 public function __toString()
 {
     if (SessionUtil::getUserlevel() >= RES_USERLEVEL_ADMIN) {
         return "<a href=\"./index.php?pageid=editUser&userid=" . $this->id . "\">" . $this->name . "</a>";
     }
     return $this->name;
 }
开发者ID:ramielrowe,项目名称:Reservation-System-V2,代码行数:7,代码来源:User.php


示例5: __construct

 public function __construct($className_, $tableName)
 {
     $this->className = $className_;
     $this->tableName = $tableName;
     $sessionUtil = SessionUtil::getInstance();
     $this->companySeq = $sessionUtil->getAdminLoggedInCompanySeq();
 }
开发者ID:munishsethi777,项目名称:jmpkng,代码行数:7,代码来源:BeanDataStore.php


示例6: handleForm

 public function handleForm($context, $action)
 {
     if ($action == "createAd") {
         if (isset($_POST['start']) && $_POST['start'] != "" && (isset($_POST['size']) && $_POST['size'] != "") && (isset($_POST['name']) && $_POST['name'] != "") && (isset($_POST['url']) && $_POST['url'] != "")) {
             $start = $_POST['start'];
             $dayOfWeek = date("D", strtotime($start));
             if ($dayOfWeek == "Mon") {
                 $splitStart = explode("/", $start);
                 $mysqlStart = $splitStart[2] . "-" . $splitStart[0] . "-" . $splitStart[1];
                 if (isset($_FILES['image']) && $_FILES['image']['size'] > 0) {
                     $filename = $this->saveSampleImage($context, $_FILES['image'], SessionUtil::getUsername());
                     if ($filename != "") {
                         WebAdDao::createWebAd($_POST['name'], $mysqlStart, $_POST['size'], $filename, $_POST['url']);
                     } else {
                         $context->addError("Error Uploading File, Please Try Again.");
                     }
                 } else {
                     $context->addError("No File Uploaded.");
                 }
             } else {
                 $context->addError("Starting Date Not a Monday.");
             }
         } else {
             $context->addError("Required Field Left Blank.");
         }
     } else {
         $context->addError("Incorrect Action.");
     }
 }
开发者ID:ramielrowe,项目名称:Reservation-System-V2,代码行数:29,代码来源:CreateAdHandler.php


示例7: getCheckinRow

 private function getCheckinRow(Reservation $reservation)
 {
     if (SessionUtil::getUserlevel() == RES_USERLEVEL_ADMIN) {
         return "<tr>\n\t\t\t\t\t\n\t\t\t\t\t<form action=\"./index.php?pageid=viewReservation\" method=\"POST\">\n\t\t\t\t\t<td class=\"centeredcellbold\">\n\t\t\t\t\t" . $this->getCheckinCell($reservation) . "\n\t\t\t\t\t</td>\n\t\t\t\t\t</form>\n\t\t\t\t\t<form action=\"./index.php?pageid=viewReservation\" method=\"POST\" onSubmit=\"return confirm('Are you sure you want to delete this reservation?')\">\n\t\t\t\t\t<td class=\"centeredcellbold\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"delete\" name=\"action\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"" . $reservation->id . "\" name=\"resid\">\n\t\t\t\t\t\t<input type=\"submit\" value=\"Delete\">\n\t\t\t\t\t</td>\n\t\t\t\t\t</form>\n\t\t\t\t\t<form action=\"./index.php?pageid=viewReservation\" method=\"POST\">\n\t\t\t\t\t<td class=\"centeredcellbold\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"" . $reservation->id . "\" name=\"resid\">\n\t\t\t\t\t\t<select name=\"status\">\n\t\t\t\t\t\t\t<option value=\"" . RES_STATUS_CONFIRMED . "\">Approve</option>\n\t\t\t\t\t\t\t<option value=\"" . RES_STATUS_DENIED . "\">Deny</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class=\"centeredcellbold\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"updateStatus\" name=\"action\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"" . $reservation->id . "\" name=\"resid\">\n\t\t\t\t\t\t<input type=\"submit\" value=\"Update\">\n\t\t\t\t\t</td>\n\t\t\t\t\t</form>\n\t\t\t\t\t\n\t\t\t\t</tr>";
     } else {
         return "";
     }
 }
开发者ID:ramielrowe,项目名称:Reservation-System-V2,代码行数:8,代码来源:ViewReservationBody.php


示例8: generateHTML

 public function generateHTML()
 {
     if (SessionUtil::getUserlevel() >= $this->getMinimumUserLevel()) {
         return $this->layout->generateHTML();
     } else {
         return $this->userLevelErrorLayout->generateHTML();
     }
 }
开发者ID:ramielrowe,项目名称:Web-Ads,代码行数:8,代码来源:Page.php


示例9: onKernelRequestSessionExpire

 public function onKernelRequestSessionExpire(GetResponseEvent $event)
 {
     if (\SessionUtil::hasExpired()) {
         // Session has expired, display warning
         $response = new Response(\ModUtil::apiFunc('ZikulaUsersModule', 'user', 'expiredsession'), 403);
         $this->setResponse($event, $response);
     }
 }
开发者ID:rmaiwald,项目名称:core,代码行数:8,代码来源:SessionExpireListener.php


示例10: contentMainEditExpandAll

 public static function contentMainEditExpandAll($belowPageId = null)
 {
     $expandedPageIds = SessionUtil::getVar('contentExpandedPageIds', array());
     foreach (Content_Util::contentMainEditGetPagesList($belowPageId) as $page) {
         $expandedPageIds[$page['id']] = 1;
     }
     SessionUtil::setVar('contentExpandedPageIds', $expandedPageIds);
 }
开发者ID:robbrandt,项目名称:Content,代码行数:8,代码来源:Util.php


示例11: generateHTML

 function generateHTML()
 {
     $user = UserDao::getUserByUsername(SessionUtil::getUsername());
     $changePasswordRows = "";
     if (Config::login_type == LOGIN_TYPE_DB) {
         $changePasswordRows = "\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t<td class=\"centeredcellbold\">Change Password</td>\n\t\t\t\t<td class=\"centeredcellbold\">Current Password</td>\n\t\t\t\t<td class=\"centeredcellbold\">New Password</td>\n\t\t\t\t<td class=\"centeredcellbold\">Confirm Password</td>\n\t\t\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t\t<form action=\"./index.php?pageid=savepassword\" method=\"POST\"><td class=\"centeredcellbold\"><input type=\"submit\" value=\"Save Password\"></td>\n\t\t\t\t\t<td class=\"centeredcell\"><input type=\"password\" name=\"curpass\"></td>\n\t\t\t\t\t<td class=\"centeredcell\"><input type=\"password\" name=\"newpass\"></th>\n\t\t\t\t\t<td class=\"centeredcell\"><input type=\"password\" name=\"confpass\"></td></form>\n\t\t\t\n\t\t\t\t</tr>";
     }
     return "<center><h3>My Account</h3>" . $this->context->getErrorHTML() . "</center>\n\t\t\t\n\t\t\t<table class=\"myaccount\">\n\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t\t<td colspan=4 class=\"header\">Edit User Information</td>\n\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t<td class=\"centeredcellbold\">Username</td>\n\t\t\t\t\t<td colspan=3 class=\"centeredcell\">" . $user->username . "</td>\n\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\n\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t<td class=\"centeredcellbold\">Name</th>\n\t\t\t\t\t<td colspan=3 class=\"centeredcell\">" . $user->name . "</td>\n\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\n\t\t\t\t" . $changePasswordRows . "\n\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t<form action=\"./index.php?pageid=saveemail\" method=\"POST\">\n\t\t\t\t\t<td colspan=1 class=\"centeredcellbold\">Email</th><td colspan=3 class=\"centeredcell\"><input type=\"text\" name=\"email\" size=30 value=\"" . $user->email . "\"><input type=\"submit\" value=\"Save Email\"></td></form>\n\t\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\n\t\t\t\t<tr>\n\t\t\t\t\n\t\t\t\t\t<td colspan=1 class=\"centeredcellbold\">Warnings</th>\n\t\t\t\t\t<td class=\"centeredcellbold\" colspan=3><a href=\"./index.php?pageid=viewMyWarnings\">" . WarningDao::getWarningCountForUserByType($user->id, RES_WARNING_ACTIVE) . "(" . WarningDao::getWarningCountForUser($user->id) . ")</a></td>\n\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t</table>";
 }
开发者ID:ramielrowe,项目名称:Reservation-System-V2,代码行数:9,代码来源:MyAccountBody.php


示例12: sessionExpired

 /**
  * Event: 'frontcontroller.predispatch'.
  *
  * @param GenericEvent $event
  *
  * @return void
  */
 public function sessionExpired(GenericEvent $event)
 {
     if (\SessionUtil::hasExpired()) {
         // Session has expired, display warning
         header('HTTP/1.0 403 Access Denied');
         $return = \ModUtil::apiFunc('UsersModule', 'user', 'expiredsession');
         \System::shutdown();
     }
 }
开发者ID:planetenkiller,项目名称:core,代码行数:16,代码来源:SystemListener.php


示例13: __construct

 function __construct()
 {
     // Set Token
     if (SessionUtil::session('token')) {
         $this->token = SessionUtil::session('token');
     }
     //Set the loggedIn
     $this->loggedIn = SessionUtil::session('loggedIn');
 }
开发者ID:pman117,项目名称:qdinka,代码行数:9,代码来源:SessionClass.php


示例14: sessionExpired

 /**
  * Event: 'frontcontroller.predispatch'.
  *
  * @param Zikula_Event $event
  *
  * @return void
  */
 public function sessionExpired(Zikula_Event $event)
 {
     if (SessionUtil::hasExpired()) {
         // Session has expired, display warning
         header('HTTP/1.0 403 Access Denied');
         echo ModUtil::apiFunc('Users', 'user', 'expiredsession');
         Zikula_View_Theme::getInstance()->themefooter();
         System::shutdown();
     }
 }
开发者ID:projectesIF,项目名称:Sirius,代码行数:17,代码来源:SystemListeners.php


示例15: handleClientDesign

 public function handleClientDesign(Context $context)
 {
     $insertDate = explode('/', $_POST['insertdate']);
     $mysqlFormattedDate = $insertDate[2] . "-" . $insertDate[1] . "-" . $insertDate[0];
     $clientId = ClientDao::getClientByLogin(LoginDao::getLoginByUsername(SessionUtil::getUsername()))->getID();
     $filename = $this->saveSampleImage($context, $_FILES['sampleimage'], $clientId);
     if ($filename != "") {
         InsertionOrderDao::createForClientWithImage(ClientDao::getClientByLogin(LoginDao::getLoginByUsername(SessionUtil::getUsername()))->getID(), $mysqlFormattedDate, $_POST['design'], $_POST['color'], $_POST['columns'], $_POST['height'], $_POST['inserts'], $_POST['placements'], $filename);
     }
 }
开发者ID:ramielrowe,项目名称:RU-Ad-System,代码行数:10,代码来源:CreateInsertionHandler.php


示例16: generateHTML

 public function generateHTML()
 {
     if (!SessionUtil::isLoggedIn() && $this->layout->getBody() instanceof LoginBody) {
         return $this->layout->generateHTML();
     } else {
         if (SessionUtil::isLoggedIn() && SessionUtil::getUserlevel() >= $this->getMinimumUserLevel()) {
             return $this->layout->generateHTML();
         } else {
             return $this->userLevelErrorLayout->generateHTML();
         }
     }
 }
开发者ID:ramielrowe,项目名称:Reservation-System-V2,代码行数:12,代码来源:Page.php


示例17: login

 public static function login($username, $password)
 {
     $user_table = new UserTable();
     $result = $user_table->select($username, $password);
     if ($result != false) {
         // 设置Session
         SessionUtil::set(array('is_login' => true, 'user_id' => $result['user_id'], 'user_login' => $result['user_login'], 'user_name' => $result['user_name'], 'user_phone' => $result['user_phone'], 'user_email' => $result['user_email'], 'user_type' => $result['user_type'], 'user_authority' => SQLUtil::get_authority($result['user_type'], $result['user_authority'])));
         return true;
     } else {
         return false;
     }
 }
开发者ID:Diaosir,项目名称:ziku,代码行数:12,代码来源:SQLUtil_l.php


示例18: generateClientHTML

 public function generateClientHTML()
 {
     $adRep = new AdRep(1, "Andrew Melton", "[email protected]", "804-267-0327");
     $status = new Status(1, "Design", "Your ad has been aproved and is being designed.");
     $designStatus = new Status(1, "To Be Designed", "A designer is working on your ad.");
     $billingStatus = new Status(1, "Paid", "");
     $orders = InsertionOrderDao::getOrdersByClientID(ClientDao::getClientByLogin(LoginDao::getLoginByUsername(SessionUtil::getUsername()))->getID());
     $ordersHTML = "";
     foreach ($orders as $order) {
         $ordersHTML = $ordersHTML . $order->generateDualRowHTML();
     }
     return "<br />\n\t\t\t\t<div id=\"insertsheader\">\n\t\t\t\t<table id=\"report2\" border=\"0\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<th class=\"adrep\">Your Ad Rep</th>\n\t\t\t\t\t\t<th class=\"created\">Created</th>\n\t\t\t\t\t\t<th class=\"updated\">Updated</th>\n\t\t\t\t\t\t<th class=\"issue\">Issue</th>\n\t\t\t\t\t\t<th class=\"status\">Status</th>\n\t\t\t\t\t\t<th class=\"designstatus\">Design-Status</th>\n\t\t\t\t\t\t<th class=\"billingstatus\">Billing</th>\n\t\t\t\t\t\t<!--<th class=\"arrow\"></th>-->\n\t\t\t\t\t\t\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t\t<div id=\"contentdiv\" class=\"scroll\">\n\t\t\t\t\n\t\t\t\t\t<table id=\"report\" border=\"0\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t" . $ordersHTML . "\n\t\t\t\t\t\n\t\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t</div>";
 }
开发者ID:ramielrowe,项目名称:RU-Ad-System,代码行数:13,代码来源:MyInsertsBody.php


示例19: generateHTML

 public function generateHTML()
 {
     $username = SessionUtil::getUsername();
     $user = UserDao::getUserByUsername($username);
     $reservations = ReservationDao::getReservationsForUser($user->id, 5);
     $reservationHTML = "";
     foreach ($reservations as $res) {
         $status = $res->getModStatusString();
         $equipment = EquipmentDao::getEquipmentByID($res->equipId);
         $reservationHTML = $reservationHTML . "<tr>\n\t\t\t\n\t\t\t\t\t<td class=\"myequip" . $status . "\">" . $equipment->name . "</td>\n\t\t\t\t\t<td class=\"myequip" . $status . "\">" . $status . "</td>\n\t\t\t\t\t<td class=\"myequip" . $status . "\">" . $res->startDate . "</td>\n\t\t\t\t\t<td class=\"myequip" . $status . "\">" . $res->endDate . "</td>\n\t\t\t\t\t<td class=\"myequip" . $status . "\"><a href=\"./index.php?pageid=viewReservation&resid=" . $res->id . "\">View</a></td>\n\t\t\t\t\t\t\n\t\t\t\t</tr>";
     }
     return OfficeHourCalendar::HTML . "<h3>Your Reservations</h3>\n\t\t\n\t\t<table class=\"myequip\">\n\t\t\n\t\t\t<tr>\n\t\t\n\t\t\t\t<td class=\"header\">Equipment Name</td>\n\t\t\t\t<td class=\"header\">Status</td>\n\t\t\t\t<td class=\"header\">Check-out Date</td>\n\t\t\t\t<td class=\"header\">Due Date</td>\n\t\t\t\t<td class=\"header\">-</td>\n\t\t\t\n\t\t\t</tr>\n\t\t\t\n\t\t\t" . $reservationHTML . "\n\t\n\t\t</table>";
 }
开发者ID:ramielrowe,项目名称:Reservation-System-V2,代码行数:13,代码来源:HomeBody.php


示例20: generateHTML

 public function generateHTML()
 {
     $user = UserDao::getUserByUsername(SessionUtil::getUsername());
     $warnings = WarningDao::getAllWarningsForUser($user->id);
     $options = "";
     foreach ($warnings as $warning) {
         $options .= $warning->toOptionHTML();
     }
     $warningSelect = "You have no warnings. :)";
     if ($options != "") {
         $warningSelect = "<form action=\"./index.php\" method=\"GET\">" . "<input type=\"hidden\" name=\"pageid\" value=\"viewWarning\" />" . "<select name=\"warnid\">" . $options . "</select>" . "<input type=\"submit\" value=\"View\" />" . "</form>";
     }
     return "<center><h3>View My Warnings</h3></center>" . $warningSelect;
 }
开发者ID:ramielrowe,项目名称:Reservation-System-V2,代码行数:14,代码来源:ViewMyWarningsBody.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP SessionUtils类代码示例发布时间:2022-05-23
下一篇:
PHP SessionManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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