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


PHP Browser::log方法代码示例

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


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

示例1: rx_interceptor_page

function rx_interceptor_page($user, $info, $handlerName)
{
    $user->validate();
    include_once RUDRA . "/core/handler/AbstractHandler.php";
    $handlerInfo = ClassUtil::getHandler($handlerName);
    if ($handlerInfo != NULL) {
        global $temp;
        include_once $handlerInfo["filePath"];
        $className = $handlerInfo["className"];
        $tempClass = new ReflectionClass($className);
        if ($tempClass->isInstantiable()) {
            $temp = $tempClass->newInstance();
        }
        if ($temp != NULL) {
            if ($tempClass->hasMethod("invokeHandler")) {
                $tpl = new Smarty();
                call_user_func(rx_function("rx_set_smarty_paths"), $tpl);
                $tpl->debugging = RX_SMARTY_DEBUG;
                $header = new Header($tpl);
                $page = new Page();
                $view = call_method_by_class($tempClass, $temp, 'invokeHandler', array('tpl' => $tpl, 'viewModel' => $tpl, 'user' => $user, 'header' => $header, 'page' => $page, 'dataModel' => $page->data, 'data' => new RequestData(get_request_param("data"))), $handlerInfo["requestParams"]);
                if (!isset($view)) {
                    $view = $handlerName;
                }
                $tpl->assign('user', $user);
                $tpl->assign('page', $page);
                $tpl->assign('header', $header);
                $tpl->assign('CONTEXT_PATH', CONTEXT_PATH);
                $tpl->assign('RESOURCE_PATH', RESOURCE_PATH);
                $tpl->assign('METAS', $header->metas);
                $tpl->assign('TITLE', $header->title);
                $view_path = $view . TEMP_EXT;
                if (!file_exists($view_path)) {
                    $tpl->setTemplateDir(RUDRA . "/core/view");
                    //$view_path = get_include_path () . RUDRA . "/core/view/".$view.TEMP_EXT;
                    //$view_path = get_include_path () . RUDRA . "../view/".$view.TEMP_EXT;
                }
                $tpl->assign('BODY_FILES', $view_path);
                $tpl->assign('page_json', json_encode($page->data->data));
                $tpl->display(RUDRA . "/core/view/full.tpl");
                Browser::log("header", $header->css, $header->scripts);
                Browser::printlogs();
            }
        }
    }
}
开发者ID:rudraks,项目名称:core,代码行数:46,代码来源:rx_interceptor_page.php

示例2: auth

 public function auth($username, $passowrd)
 {
     global $RDb;
     $res = $RDb->fetchAll("SELECT * FROM user WHERE uname = '%s' AND password = '%s'", $username, $passowrd);
     if (count($res) == 0) {
         //echo "no";
         $this->unauth();
         $this->set('coins', 0);
         return false;
     } else {
         $this->uname = $username;
         $this->uid = $res[0]->uid;
         $this->setValid();
         $this->set('coins', $res[0]->coins);
         Browser::log("coins", $this->get('coins'));
         //Browser::log("auth",$this->uid,$this->getData());
         return true;
     }
 }
开发者ID:rx-projects,项目名称:comicasa,代码行数:19,代码来源:User.php

示例3: rx_interceptor_page

function rx_interceptor_page($user, $controllerInfo, $params, $controllerExecute)
{
    ?>
    <html>
    <?

    $tpl = new Smarty ();
    $params["model"] = $tpl;
    $header = new \app\model\Header ($tpl);
    call_user_func(rx_function("rx_set_smarty_paths"), ($tpl));
    $view = $controllerExecute($params);

    $tpl->debugging = RX_SMARTY_DEBUG;

    $tpl->assign('user', $user);
    $tpl->assign('header', $header);

    $tpl->assign('CONTEXT_PATH', CONTEXT_PATH);

    $tpl->assign('METAS', $header->metas);
    $tpl->assign('TITLE', $header->title);

    ?>
    <head></head>
<body>

    <?

    $tpl->display($view_path = $view . TEMP_EXT);

    ?></body><?

    Browser::log("header", $header->css, $header->scripts);
    Browser::printlogs();

    ?></html><?
}
开发者ID:rudraks,项目名称:boot,代码行数:37,代码来源:rx_interceptor_page.php

示例4: save

 public function save()
 {
     Browser::log($this->uid, $this->info);
     self::$usercache->set($this->uid, $this->info);
     Browser::log(self::$usercache->get($this->uid));
 }
开发者ID:rudraks,项目名称:core,代码行数:6,代码来源:AbstractUser.php

示例5: setFetchMode

 public function setFetchMode($mode)
 {
     //check for PDO extension
     switch ($mode) {
         case PDO::FETCH_LAZY:
         case PDO::FETCH_ASSOC:
         case PDO::FETCH_NUM:
         case PDO::FETCH_BOTH:
         case PDO::FETCH_NAMED:
         case PDO::FETCH_OBJ:
             $this->_fetchMode = $mode;
             break;
         default:
             //$this->_fetchMode = PDO::FETCH_OBJ;
             Browser::log("Invalid fetch mode " . $mode . " specified");
             break;
     }
 }
开发者ID:rudraks,项目名称:boot,代码行数:18,代码来源:AbstractDb.php

示例6: invokeHandler

 public function invokeHandler(Smarty $viewModel, Header $header, $pid, $imageAction = "view", User $user)
 {
     $header->title('PayPic');
     $header->import('picbootstrap', 'mypage');
     $viewModel->assign("pname", "@RTPic");
     global $RDb;
     $picture = new Picture($pid, $user->getToken());
     //$image = Picture::getPicInfoById($pid);
     Browser::log($picture, $user->getToken(), $picture->image->uid, $user->getToken() == $picture->image->uid);
     $hasBaught = false;
     $hasSaved = false;
     $canBuy = false;
     if ($user->isValid()) {
         if ($picture->isMyPic()) {
             Browser::log('isMyPic');
             $user->set('canAccess_' . $pid, $picture->image->file_path);
         } else {
             $imageAccess = Picture::getPicAccess($pid, $user->getToken());
             $hasFileAccessIndexed = !empty($imageAccess);
             if ($hasFileAccessIndexed) {
                 $hasBaught = $imageAccess->baught == 1;
                 $hasSaved = $imageAccess->saved == 1;
             }
             $canBuy = $user->getCoins() >= $picture->image->price;
             if (strcmp("buyImage", $imageAction) == 0) {
                 if ($picture->isPaid() && !$hasBaught && $canBuy) {
                     if ($hasFileAccessIndexed) {
                         $RDb->update("update file_access set baught=1 where uid=%d AND pid=%d", $user->uid, $pid);
                     } else {
                         $RDb->update("INSERT INTO file_access (uid,pid,baught,saved) values(%d,%d,1,1)", $user->uid, $pid);
                         $hasFileAccessIndexed = true;
                     }
                     $user->setCoins($user->get('coins') - $picture->image->price);
                     $hasBaught = true;
                 }
             } else {
                 if (strcmp("saveImage", $imageAction) == 0) {
                     if ($hasFileAccessIndexed) {
                         $RDb->update("update file_access set saved=1 where uid=%d AND pid=%d", $user->uid, $pid);
                     } else {
                         $RDb->update("INSERT INTO file_access (uid,pid,baught,saved) values(%d,%d,0,1)", $user->uid, $pid);
                         $hasFileAccessIndexed = true;
                     }
                     $hasSaved = true;
                 } else {
                     if (strcmp("unsaveImage", $imageAction) == 0) {
                         if ($hasFileAccessIndexed) {
                             $RDb->update("update file_access set saved=0 where uid=%d AND pid=%d", $user->uid, $pid);
                         }
                         $hasFileAccessIndexed = true;
                         $hasSaved = false;
                     } else {
                         if (strcmp("likeImage", $imageAction) == 0) {
                             if ($hasFileAccessIndexed) {
                                 $like = $imageAccess->liked == 0 ? 1 : 0;
                                 $RDb->update("update file_access set liked=%d where uid=%d AND pid=%d", $like, $user->uid, $pid);
                             } else {
                                 $RDb->update("INSERT INTO file_access (uid,pid,liked,baught,saved) values(%d,%d,1,0,0)", $user->uid, $pid);
                             }
                             $picture->image->likes = $picture->image->likes + $like * 2 - 1;
                             $RDb->update("update files set likes=%d where id=%d", ${$picture}->image->likes, $pid);
                             $hasFileAccessIndexed = true;
                         }
                     }
                 }
             }
             if (!$picture->isPaid() || $hasBaught) {
                 $user->set('canAccess_' . $pid, $picture->image->file_path);
             }
         }
     }
     $viewModel->assign("isMyPic", $picture->isMyPic());
     $viewModel->assign("canBuy", $canBuy);
     $viewModel->assign("hasBaught", $hasBaught);
     $viewModel->assign("isPaid", $picture->isPaid());
     $viewModel->assign("hasSaved", $hasSaved);
     $viewModel->assign("image", $picture->image);
     return "image";
 }
开发者ID:rx-projects,项目名称:comicasa,代码行数:79,代码来源:Image.php


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