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

PHP get_site_options函数代码示例

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

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



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

示例1: _initialize

 function _initialize()
 {
     parent::_initialize();
     $site_options = get_site_options();
     $this->assign($site_options);
     $ucenter_syn = C("UCENTER_ENABLED");
     if ($ucenter_syn) {
         if (!isset($_SESSION["user"])) {
             if (!empty($_COOKIE['thinkcmf_auth']) && $_COOKIE['thinkcmf_auth'] != "logout") {
                 $thinkcmf_auth = sp_authcode($_COOKIE['thinkcmf_auth'], "DECODE");
                 $thinkcmf_auth = explode("\t", $thinkcmf_auth);
                 $auth_username = $thinkcmf_auth[1];
                 $users_model = M('Users');
                 $where['user_login'] = $auth_username;
                 $user = $users_model->where($where)->find();
                 if (!empty($user)) {
                     $is_login = true;
                     $_SESSION["user"] = $user;
                 }
             }
         } else {
         }
     }
     if (sp_is_user_login()) {
         $this->assign("user", sp_get_current_user());
     }
 }
开发者ID:noikiy,项目名称:luokeke2,代码行数:27,代码来源:HomeBaseController.class.php


示例2: _send_to_resetpass

    protected function _send_to_resetpass($user)
    {
        $options = get_site_options();
        //邮件标题
        $title = $options['site_name'] . "密码重置";
        $uid = $user['id'];
        $username = $user['user_login'];
        $activekey = md5($uid . time() . uniqid());
        $users_model = M("Users");
        $result = $users_model->where(array("id" => $uid))->save(array("user_activation_key" => $activekey));
        if (!$result) {
            $this->error('密码重置激活码生成失败!');
        }
        //生成激活链接
        $url = U('user/login/password_reset', array("hash" => $activekey), "", true);
        //邮件内容
        $template = <<<hello
\t\t#username#,你好!<br>
\t\t请点击或复制下面链接进行密码重置:<br>
\t\t<a href="http://#link#">http://#link#</a>
hello;
        $content = str_replace(array('http://#link#', '#username#'), array($url, $username), $template);
        $send_result = sp_send_email($user['user_email'], $title, $content);
        if ($send_result['error']) {
            $this->error('密码重置邮件发送失败!');
        }
    }
开发者ID:lvxiaolin,项目名称:thinkcfm,代码行数:27,代码来源:LoginController.class.php


示例3: _initialize

 function _initialize()
 {
     parent::_initialize();
     $site_options = get_site_options();
     $this->assign($site_options);
     $ucenter_syn = C("UCENTER_ENABLED");
     if ($ucenter_syn) {
         if (!isset($_SESSION["MEMBER_id"])) {
             if (!empty($_COOKIE['thinkcmf_auth']) && $_COOKIE['thinkcmf_auth'] != "logout") {
                 $thinkcmf_auth = sp_authcode($_COOKIE['thinkcmf_auth'], "DECODE");
                 $thinkcmf_auth = explode("\t", $thinkcmf_auth);
                 $auth_username = $thinkcmf_auth[1];
                 $members_obj = M('Members');
                 $where['user_login_name'] = $auth_username;
                 $member = $members_obj->where($where)->find();
                 if (!empty($member)) {
                     $is_login = true;
                     $_SESSION["MEMBER_type"] = 'local';
                     $_SESSION["MEMBER_id"] = $member['ID'];
                     $_SESSION['MEMBER_name'] = $auth_username;
                     $_SESSION['MEMBER_status'] = $member['user_status'];
                 }
             }
         } else {
         }
     }
 }
开发者ID:Nightchen0521,项目名称:cmf,代码行数:27,代码来源:HomeBaseAction.class.php


示例4: swfupload

 /**
  * swfupload 上传 
  */
 public function swfupload()
 {
     if (IS_POST) {
         //上传处理类
         $config = array('rootPath' => './' . C("UPLOADPATH"), 'savePath' => '', 'maxSize' => 11048576, 'saveName' => array('uniqid', ''), 'exts' => array('jpg', 'gif', 'png', 'jpeg', "txt", 'zip'), 'autoSub' => true);
         $upload = new \Think\Upload($config);
         //
         $info = $upload->upload();
         //开始上传
         if ($info) {
             //上传成功
             //写入附件数据库信息
             $first = array_shift($info);
             if (!empty($first['url'])) {
                 $url = $first['savepath'] . $first['url'];
             } else {
                 $url = C("TMPL_PARSE_STRING.__UPLOAD__") . $first['savepath'] . $first['savename'];
             }
             $textareaid = I('post.textareaid');
             if ('goods_photos' === $textareaid) {
                 // 商品缩略图
                 $bigimg = $first['savepath'] . $first['savename'];
                 $image = new \Think\Image();
                 $srcimg = $upload->rootPath . $bigimg;
                 $image->open($srcimg);
                 $site_options = get_site_options();
                 $image->thumb($site_options['goods_thumb_width'], $site_options['goods_thumb_height']);
                 $dirname = './' . C("UPLOADPATH_S") . $first['savepath'];
                 if (!is_dir($dirname)) {
                     mkdir($dirname);
                 }
                 $image->save($dirname . $first['savename']);
             }
             echo "1," . $url . "," . '1,' . $first['name'];
             exit;
         } else {
             //上传失败,返回错误
             exit("0," . $upload->getError());
         }
     } else {
         if (isset($_GET['file_upload_limit'])) {
             $file_upload_limit = I('get.file_upload_limit');
         } else {
             $file_upload_limit = 1;
         }
         $textareaid = I('get.textareaid');
         $this->assign('file_upload_limit', $file_upload_limit);
         $this->assign('textareaid', $textareaid);
         $this->display(':swfupload');
     }
 }
开发者ID:kmlzh1983,项目名称:diamond,代码行数:54,代码来源:AssetController.class.php


示例5: _initialize

 function _initialize()
 {
     parent::_initialize();
     $site_options = get_site_options();
     $this->assign($site_options);
     $ucenter_syn = C("UCENTER_ENABLED");
     if ($ucenter_syn) {
         if (!isset($_SESSION["user"])) {
             if (!empty($_COOKIE['thinkcmf_auth']) && $_COOKIE['thinkcmf_auth'] != "logout") {
                 $thinkcmf_auth = sp_authcode($_COOKIE['thinkcmf_auth'], "DECODE");
                 $thinkcmf_auth = explode("\t", $thinkcmf_auth);
                 $auth_username = $thinkcmf_auth[1];
                 $users_model = M('Member');
                 $where['user_login'] = $auth_username;
                 $user = $users_model->where($where)->find();
                 if (!empty($user)) {
                     $is_login = true;
                     $_SESSION["user"] = $user;
                 }
             }
         } else {
         }
     }
     if (sp_is_user_login()) {
         $this->assign("user", sp_get_current_user());
     } else {
         if (isset($_COOKIE['user_login'])) {
             $users_model = M('Member');
             $where['user_login'] = $_COOKIE['user_login'];
             $user = $users_model->where($where)->find();
             //echo $_COOKIE['user_auth'];echo '<br>';echo md5($result['user_pass'].'iloveyouhmvpoint');die;
             if (md5($user['user_pass'] . 'iloveyouhmvpoint') == $_COOKIE['user_auth']) {
                 $_SESSION['user'] = $user;
             }
         }
     }
     // 热搜
     $top_hot_search = M('Ad')->where('ad_content="top_hot_search"')->limit(7)->select();
     $this->assign('top_hot_search', $top_hot_search);
     $cart = A('Order/Cart')->cart();
     $this->assign('cartNum', count($cart['cart']));
 }
开发者ID:kmlzh1983,项目名称:diamond,代码行数:42,代码来源:HomeBaseController.class.php


示例6: sp_get_site_options

function sp_get_site_options()
{
    get_site_options();
}
开发者ID:noikiy,项目名称:luokeke2,代码行数:4,代码来源:function.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_site_preference函数代码示例发布时间:2022-05-15
下一篇:
PHP get_site_option函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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