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


PHP Header::import方法代码示例

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


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

示例1: invokeHandler

 public function invokeHandler(Smarty $viewModel, Header $header, User $user, $page)
 {
     $header->title('PayPic');
     $viewModel->assign("pname", "@RTPic");
     if ($user->isValid()) {
         $header->import('jqgeeks/bootstrap_css', 'upload');
         global $RDb;
         $images = $RDb->fetchAll("select * from files where uid=%d AND albumid=0", $user->getToken());
         $viewModel->assign("images", $images);
         return "upload";
     } else {
         $header->import('jqgeeks/bootstrap_css', 'google_login');
         return "login";
     }
 }
开发者ID:rx-projects,项目名称:comicasa,代码行数:15,代码来源:Upload.php

示例2: invokeHandler

 public function invokeHandler(Smarty $viewModel, Header $header, $f, $page)
 {
     $header->title('PayPic');
     $header->import('jqgeeks/bootstrap_css', 'mypage');
     $viewModel->assign("pname", "@RTPic");
     return self::showLatest($viewModel);
 }
开发者ID:rx-projects,项目名称:comicasa,代码行数:7,代码来源:Images.php

示例3: invokeHandler

 public function invokeHandler(Smarty $viewModel, Header $header, $f, $page, $aid)
 {
     $header->title('PayPic');
     $header->import('picbootstrap', 'mypage');
     $viewModel->assign("pname", "@RTPic");
     $album = new Album($aid);
     $viewModel->assign("images", $album->getImges());
     return "images";
 }
开发者ID:rx-projects,项目名称:comicasa,代码行数:9,代码来源:ViewAlbum.php

示例4: invokeHandler

 public function invokeHandler(Smarty $viewModel, Header $header, $f, $page, $pid)
 {
     $header->title('PayPic');
     $header->import('jqgeeks/bootstrap_css', 'mypage');
     $viewModel->assign("pname", "@RTPic");
     global $RDb;
     $image = $RDb->fetch("select * from files where id=%d", $pid);
     $viewModel->assign("image", $image);
     return "image";
 }
开发者ID:rx-projects,项目名称:comicasa,代码行数:10,代码来源:buyImage.php

示例5: invokeHandler

 public function invokeHandler(Smarty $viewModel, Header $header, $f, $page)
 {
     $header->title('PayPic');
     $header->import('jqgeeks/bootstrap_css', 'mypage');
     $viewModel->assign("pname", "@RTPic");
     global $RDb;
     $imageAccess = $RDb->fetchAll("select * from file_access fa,files f,user u" . " where fa.pid=f.id and u.uid=fa.uid");
     $viewModel->assign("images", $imageAccess);
     return "imageAccess";
 }
开发者ID:rx-projects,项目名称:comicasa,代码行数:10,代码来源:ImageAccess.php

示例6: invokeHandler

 public function invokeHandler(Smarty $viewModel, Header $header, User $user, $uname, $upass)
 {
     $header->title('PayPic');
     $header->import('jqgeeks/bootstrap_css', 'google_login');
     $viewModel->assign("pname", "@RTPic");
     if ($user->auth($uname, $upass)) {
         include_once HANDLER_PATH . "/Images.php";
         return Images::showlatest($viewModel);
     } else {
         return "login";
     }
 }
开发者ID:rx-projects,项目名称:comicasa,代码行数:12,代码来源:Submitlogin.php

示例7: invokeHandler

 /**
  * @param Smarty $viewModel
  * @param Header $header
  * @param DataModel $dataModel
  * @param User $user
  * @param string $view
  * @param string $module
  * @return string
  */
 public function invokeHandler(Smarty $viewModel, Header $header, DataModel $dataModel, User $user, $view = "empty", $module = "index_page")
 {
     $header->title("ThEroticStories");
     $header->import($module);
     return $view;
 }
开发者ID:rahugee,项目名称:maple,代码行数:15,代码来源:IndexPage.php

示例8: invokeHandler

 public function invokeHandler(Smarty $viewModel, Header $header, DataModel $dataModel, AbstractUser $user, $view = "empty")
 {
     $header->title(DEFAULT_TITLE);
     $header->import(DEFAULT_BUNDLE);
     return $view;
 }
开发者ID:rudraks,项目名称:core,代码行数:6,代码来源:SampleIndexHandler.php

示例9: 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


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