Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php SilverStripe管理更改_Php_Silverstripe - Fatal编程技术网

Php SilverStripe管理更改

Php SilverStripe管理更改,php,silverstripe,Php,Silverstripe,我正在尝试添加新的设置页面和电子邮件页面。当您点击电子邮件菜单时,它位于silverstripe admin cms下,但在重新加载电子邮件页面后,它不在silverstripe admin cms下 那么,它不在管理cms下的原因是什么 以下是控制器代码: public function index() { $getmem=Member::currentUser(); if($getmem->RainloopEmail !='' && $getmem-&g

我正在尝试添加新的设置页面和电子邮件页面。当您点击电子邮件菜单时,它位于silverstripe admin cms下,但在重新加载电子邮件页面后,它不在silverstripe admin cms下

那么,它不在管理cms下的原因是什么

以下是控制器代码:

public function index() {
    $getmem=Member::currentUser();
    if($getmem->RainloopEmail !='' && $getmem->Pass !='')
    {
        $com=$getmem->RainloopEmail.":".$getmem->Pass;
        $encrypted = base64_encode($getmem->RainloopEmail) ;
        $rainloopemail=$encrypted;
        $encrypted =base64_encode($getmem->Pass);
        $pss=$encrypted;

        $hash=base64_encode($com);

    }
    else
    {
        $rainloopemail='';
        $pss='';
        $com=$getmem->RainloopEmail.":".$getmem->Pass;
        $hash=base64_encode($com);

    }
    $url='http://op.mctitsolutions.com/rainloop/rainloop.php?hash='.$hash;
    $arrayData = new ArrayData(array(
'Width' => '100%',
'Height' => '100%',
'Location'=>$url ));

return $arrayData->renderWith(Array('EmailsAdminController_Content','Coach_message','Page'));

}
以下是模板文件代码:

<div style="padding:55px 20px">
$EditForm
<iframe  id="MainPopupIframe"  width="$Width" height="605px" src="$Location"></iframe>

$EditForm

那么,它不在管理cms下的原因是什么呢?

以下是我的答案

在控制器中添加了新功能。和用于在模板文件中显示的循环。这解决了我的问题

public function getViewEmails() {
    $hash='';
            $getmem=Member::currentUser();
    if($getmem->RainloopEmail !='' && $getmem->Pass !='')
    {
        $com=$getmem->RainloopEmail.":".$getmem->Pass;
        $encrypted = base64_encode($getmem->RainloopEmail) ;
        $rainloopemail=$encrypted;
        $encrypted =base64_encode($getmem->Pass);
        $pss=$encrypted;

        $hash=base64_encode($com);

    }
    else
    {
        $rainloopemail='';
        $pss='';
        $com=$getmem->RainloopEmail.":".$getmem->Pass;
        $hash=base64_encode($com);

    }
    $url='http://op.mctitsolutions.com/rainloop/rainloop.php?hash='.$hash;
        return new ArrayList(array(
                new ArrayData(array(
                        'Url'=>$url,
                        'Width' => '100%',
                ))
        ));
}
这是我的模板文件

<div style="padding:55px 20px">

<% loop ViewEmails %>
<iframe  id="MainPopupIframe"  width="$Width" height="605px" src="$Url">
 </iframe>
   <% end_loop %>
</div>

这是我的答案

在控制器中添加了新功能。和用于在模板文件中显示的循环。这解决了我的问题

public function getViewEmails() {
    $hash='';
            $getmem=Member::currentUser();
    if($getmem->RainloopEmail !='' && $getmem->Pass !='')
    {
        $com=$getmem->RainloopEmail.":".$getmem->Pass;
        $encrypted = base64_encode($getmem->RainloopEmail) ;
        $rainloopemail=$encrypted;
        $encrypted =base64_encode($getmem->Pass);
        $pss=$encrypted;

        $hash=base64_encode($com);

    }
    else
    {
        $rainloopemail='';
        $pss='';
        $com=$getmem->RainloopEmail.":".$getmem->Pass;
        $hash=base64_encode($com);

    }
    $url='http://op.mctitsolutions.com/rainloop/rainloop.php?hash='.$hash;
        return new ArrayList(array(
                new ArrayData(array(
                        'Url'=>$url,
                        'Width' => '100%',
                ))
        ));
}
这是我的模板文件

<div style="padding:55px 20px">

<% loop ViewEmails %>
<iframe  id="MainPopupIframe"  width="$Width" height="605px" src="$Url">
 </iframe>
   <% end_loop %>
</div>


你的问题是什么?@3dgoo为什么要减票?补充问题?我没有否决你的问题。我只能猜测为什么你的问题被否决了。以下是我认为你的问题中的一些问题。希望您能发现这对改进您的问题很有用。此问题缺少足够的信息来诊断问题。不清楚你的问题是什么。尝试编写一个简单的问题示例,其中包含其他人可以重新创建问题的最少代码量。陈述你正试图做什么,你期望什么结果,你得到什么结果,并展示你试图克服这个问题的方法。你的问题是什么?@3dgoo为什么减票?补充问题?我没有否决你的问题。我只能猜测为什么你的问题被否决了。以下是我认为你的问题中的一些问题。希望您能发现这对改进您的问题很有用。此问题缺少足够的信息来诊断问题。不清楚你的问题是什么。尝试编写一个简单的问题示例,其中包含其他人可以重新创建问题的最少代码量。陈述你正在尝试做什么,你期望得到什么结果,你得到什么结果,并展示你试图克服这一点的方法。