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


PHP Factory::getUser方法代码示例

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


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

示例1: Delete

 public function Delete()
 {
     Factory::getUser()->authorise("admin", ResponseRegistery::getInstance()->site_id);
     try {
         $this->db->delete("ge_ads", $this->input->getInt("id"));
         Messages::getInstance()->logSuccess('تبلیغ مورد نظر  با موفقیت حذف شد');
     } catch (Exception $ex) {
         Messages::getInstance()->logError('هیچ تبلیغی حذف شد');
     }
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL . "/admin/ads/show");
 }
开发者ID:redknight,项目名称:frot,代码行数:11,代码来源:AdminAdsService.php

示例2: saveSettings

 function saveSettings()
 {
     Factory::getUser()->authorise("setting", ResponseRegistery::getInstance()->site_id);
     $object = $this->input->get('POST');
     $object['id'] = Session::getInstance()->weblog_id;
     $user->account_no = $object['account_no'];
     $user->cellphone = $object['cellphone'];
     $user->id = Factory::getUser()->id;
     unset($object['account_no']);
     unset($object['cellphone']);
     $this->db->StoreObject("wb_weblogs", $object);
     $this->db->StoreObject("ge_users", $user);
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL . '/dashboard/blog/settings');
 }
开发者ID:redknight,项目名称:frot,代码行数:14,代码来源:DashboardBlogService.php

示例3: showLinks

 private function showLinks($linkType)
 {
     Factory::getUser()->authorise("link", ResponseRegistery::getInstance()->site_id);
     $weblog_id = Session::getInstance()->weblog_id;
     $dailyLinks = $this->db->SimpleSelect("wb_links", "id,url,title", "weblog_id={$weblog_id} AND type='{$linkType}'")->fetchAll();
     $this->tmpl->loadPage("dailyLinks");
     $this->tmpl->assign("dailyLinks", $dailyLinks);
     $this->tmpl->assign("type", $linkType);
     $linkInfo = $this->db->SimpleSelect("wb_links", "id,url,title", array("weblog_id" => $weblog_id, "id" => $this->input->getInt("id"), "type" => $linkType))->fetch();
     if (!$linkInfo) {
         $linkInfo = new istdClass();
     }
     $this->tmpl->assign("linkInfo", $linkInfo);
     $this->reponse->setTemplate($this->tmpl);
 }
开发者ID:redknight,项目名称:frot,代码行数:15,代码来源:DashboardLinkService.php

示例4: saveStatus

 public function saveStatus()
 {
     Factory::getUser()->authorise("admin", ResponseRegistery::getInstance()->site_id);
     fb($this->input->getInt('RequestID'));
     if ($this->input->getInt('RequestID') != 0) {
         $data->id = $this->input->getInt('RequestID');
         $data->status = $this->input->getString('status');
         try {
             $this->db->StoreObject("sh_requests", $data);
             Messages::getInstance()->logSuccess('تغییر مورد نظر با موفقیت انجام شد');
         } catch (Exception $ex) {
             Messages::getInstance()->logError('در انجام عملیات خطایی رخ داده است');
         }
     }
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL . "/dashboard/shopRequest/showrequest");
 }
开发者ID:redknight,项目名称:frot,代码行数:16,代码来源:AdminShopRequestService.php

示例5: saveCode

 public function saveCode()
 {
     Factory::getUser()->authorise("template", ResponseRegistery::getInstance()->site_id);
     $db = Factory::getDBO();
     $data->main = $this->input->getString('main');
     $data->id = $this->getWebLogTemplateId();
     $db->StoreObject("ge_templates", $data);
     //Messages::getInstance()->logSuccess('قالب با موفقیت ذخیره و اعمال شد');
     $msg = Messages::getInstance();
     $msg->logSuccess('قالب با موفقیت ذخیره شد');
     if ($this->compile($data->main, $data->id)) {
         $msg->logSuccess('قالب با موفقیت اعمال شد');
     } else {
         $msg->logError('در ساختار قالب خطا وجود دارد لطفا قبل از نمایش وبلاگ این خطاها را بررسی کنید');
     }
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL . "/dashboard/template/show");
 }
开发者ID:redknight,项目名称:frot,代码行数:17,代码来源:DashboardTemplateService.php

示例6: findWeblogAddress

    public function findWeblogAddress()
    {
        $db = Factory::getDBO();
        $sql = 'SELECT
		    site.id,
                    sub_domain
                 FROM ge_subdomains sub
                 JOIN ge_sites as site
                    ON(sub.site_id=site.id)
                 JOIN ge_users_sites as us
                    ON(site.id=us.site_id)
                 WHERE
                    us.user_id=' . intval(Factory::getUser()->id);
        fb(Factory::getUser()->id, 'user_id');
        $sub = $db->query($sql)->fetch();
        if ($sub) {
            ResponseRegistery::getInstance()->site_id = $sub->id;
            return $sub->sub_domain;
        }
        return false;
    }
开发者ID:redknight,项目名称:frot,代码行数:21,代码来源:DashboardController.php

示例7: deleteSubgroup

 public function deleteSubgroup()
 {
     Factory::getUser()->authorise("group", ResponseRegistery::getInstance()->site_id);
     try {
         $this->db->delete("sh_subgroups", $this->input->getInt('id'));
         Messages::getInstance()->logSuccess("زیر گروه مورد نظر با موفقیت حذف شد");
     } catch (Exception $e) {
         Messages::getInstance()->logError("هیچ زیر گروهی حذف نشد");
     }
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL . "/dashboard/shopGroup/showGroups");
 }
开发者ID:redknight,项目名称:frot,代码行数:11,代码来源:DashboardShopGroupService.php

示例8: logout

 public function logout()
 {
     Factory::getUser()->logout();
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL);
 }
开发者ID:redknight,项目名称:frot,代码行数:5,代码来源:UserService.php

示例9: delete

 public function delete()
 {
     Factory::getUser()->authorise("item", ResponseRegistery::getInstance()->site_id);
     try {
         $item_id = $this->input->getInt('id');
         $query = "DELETE FROM sh_subgroups_items WHERE item_id = {$item_id}";
         $this->db->execute($query);
         $query = "DELETE FROM sh_images WHERE item_id = {$item_id}";
         $this->db->execute($query);
         $query = "DELETE FROM sh_items WHERE id = {$item_id}";
         $this->db->execute($query);
         // [FIXIT] images file not delete
         Messages::getInstance()->logSuccess("کالای مورد نظر با موفقیت حذف شد");
     } catch (Exception $e) {
         Messages::getInstance()->logError("هیچ کالایی حذف نشد");
         Messages::getInstance()->logError($e);
     }
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL . "/dashboard/shopItem/showItem");
 }
开发者ID:redknight,项目名称:frot,代码行数:19,代码来源:AdminShopItemService.php

示例10: disban

 public function disban()
 {
     Factory::getUser()->authorise("admin", ResponseRegistery::getInstance()->site_id);
     $site_id = $this->input->getInt('id');
     $tmp->id = $site_id;
     $tmp->active = 1;
     Factory::getDBO()->StoreObject("ge_sites", $tmp);
     Messages::getInstance()->logSuccess('سایت مورد نظر با موفقیت فعال شد');
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL . "/admin/blog/show");
 }
开发者ID:redknight,项目名称:frot,代码行数:10,代码来源:AdminBlogService.php

示例11: commentDelete

 public function commentDelete()
 {
     Factory::getUser()->authorise("comment", ResponseRegistery::getInstance()->site_id);
     try {
         $sql = 'DELETE FROM  wb_comment WHERE id=' . $this->input->getInt('id');
         //FIXME. ' and weblog_id=' . Session::getInstance()->weblog_id;
         $this->db->execute($sql);
     } catch (MySQLException $e) {
         if ($e->getCode() == 1451) {
             fb($e);
             Messages::getInstance()->logWarning('یک یا چند پست با این موضع وجود دارد ابتدا انها را ویرایش کنید');
         } else {
             throw $e;
         }
     }
     $this->reponse->redirect(ResponseRegistery::getInstance()->baseURL . "/dashboard/post/comment");
 }
开发者ID:redknight,项目名称:frot,代码行数:17,代码来源:DashboardPostService.php

示例12: current

 function current()
 {
     $id = $this->ids[$this->index]['id'];
     return Factory::getUser($id);
 }
开发者ID:lisiqiong,项目名称:imoocMvc,代码行数:5,代码来源:AllUser.php


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