<%@ Control Language="c#" AutoEventWireup="true" Inherits="CSPortal.PortalModule.PortalModuleControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="Portal" TagName="Title" Src="~/Parts/P_ModuleTitle.ascx" %>
<%@ import Namespace="CSPortal" %>
<script language="c#" runat="server">
void Page_Load(object sender, EventArgs e)
{
JavaScript = ModuleTitle.JavaScript; //JavaScriptチェックをスキップするときには必須
//Insert code here
if(!this.IsPostBack)
{
string subjectstr = "URLのお知らせ";
string bodystr = "Common.RequestUrlRewrite(""URef", "", true).Replace("https://", "http://"); //ログイン後戻り先、絶対パス、不要なパラメータは削除
/*
* メールリンクの URL を Shift-JIS で URL エンコードした場合、
* Firefox と OutlookExpress 6 および、Firefox と WindowsMail の組み合わせで、
* メールの文字化けが発生します。
* この問題を回避するために、ブラウザテーマ用の『このURLをメールで知らせる』モジュールを、メールリンクを URL エンコードしない設定で動作させています。
* 詳細は、
http://www.i-site.jp/dd.aspx?itemid=2203#itemid2203 を参照してください。
*/
// メールリンクの日本語部分を URL エンコードしない場合
if(Request.IsAuthenticated)
{ //ログインしている場合はアクセス拒否経由と両方,httpsの置換えはSoftBankのSSL不具合対応のため
bodystr += "%0d%0a直接ログインするには以下から、ただし一度ログアウト後に。%0d%0a";
if(Request.Url.Query == "")
bodystr += Request.Url.AbsoluteUri.Replace("https://", "http://");
else
bodystr += Request.Url.AbsoluteUri.Replace(Request.Url.Query, "").Replace("https://", "http://");
bodystr += "%3fmenuid%3d" + Common.GetLoginMenuID()
+ "%26URef%3d" + Server.UrlEncode(Server.UrlEncode(Common.RequestUrlRewrite("URef", "").TrimStart('/'))) //ログイン後戻り先、不要なパラメータは削除
+ "%26URefID%3d" + this.MenuID //ページタイトル表示のため
+ "%26username%3d";
bodystr += "%0d%0a末尾の\"username=\"に続けてアカウントを記述できます。%0d%0a";
}
MailLink.NavigateUrl = "mailto:" + "?subject=" + subjectstr + "&body=" + bodystr;
/*
// メールリンクの日本語部分を Shift-JIS で URLエンコードする場合
if(Request.IsAuthenticated)
{ //ログインしている場合はアクセス拒否経由と両方,httpsの置換えはSoftBankのSSL不具合対応のため
bodystr += "\n直接ログインするには以下から、ただし一度ログアウト後に。\n";
if(Request.Url.Query == "")
bodystr += Request.Url.AbsoluteUri.Replace("https://", "http://");
else
bodystr += Request.Url.AbsoluteUri.Replace(Request.Url.Query, "").Replace("https://", "http://");
bodystr += "?menuid=" + Common.GetLoginMenuID()
+ "&URef=" + Server.UrlEncode(Common.RequestUrlRewrite("URef", "").TrimStart('/')) //ログイン後戻り先、不要なパラメータは削除
+ "&URefID=" + this.MenuID //ページタイトル表示のため
+ "&username=";
bodystr += "\n末尾の\"username=\"に続けてアカウントを記述できます。\n";
}
MailLink.NavigateUrl = "mailto:" + "?subject=" + Server.UrlEncode(subjectstr) + "&body=" + Server.UrlEncode(bodystr);
*/
}
}
</script>
<!--Program_BMUrl start-->
<portal:Title ShowEditButton="true" EditUrl="" runat="server" id="ModuleTitle" javascript="false"/>
<div align=right>
<img src="css/cm/info_small.gif" alt="携帯などにメールでこのサイトのURLを連絡します。携帯から接続すると自動的にモバイルサイトに接続します。"> <asp:hyperlink id="MailLink" runat="server">このURLをメールで知らせる</asp:hyperlink>
</div>
<!--Program_BMUrl end-->
<%@ Control Language="c#" AutoEventWireup="true" Inherits="CSPortal.PortalModule.MobilePortalModuleControl" TargetSchema="http://schemas.microsoft.com/Mobile/WebUserControl" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<%@ Register TagPrefix="mportal" TagName="Title" Src="~/Parts/P_MModuleTitle.ascx" %>
<%@ Register TagPrefix="mportal" Namespace="CSPortal.MobileControls" Assembly="CSPortal" %>
<%@ import Namespace="CSPortal" %>
<script language="c#" runat="server">
void Page_Load(object sender, EventArgs e)
{
//Insert code here
if(!this.IsPostBack)
{
string subjectstr = "URLのお知らせ";
string bodystr = "Common.RemoveMobileAuthenticationURI(Common.RequestUrlRewrite(""URef,MPUID,__redir,__ufps", ",,,", true)).Replace("https://", "http://"); //ログイン後戻り先、絶対パス、不要なパラメータは削除
if(Request.IsAuthenticated)
{ //ログインしている場合はアクセス拒否経由と両方,httpsの置換えはSoftBankのSSL不具合対応のため
bodystr += "\n直接ログインするには以下から、ただし一度ログアウト後に。\n";
if(Request.Url.Query == "")
bodystr += Request.Url.AbsoluteUri.Replace("https://", "http://");
else
bodystr += Request.Url.AbsoluteUri.Replace(Request.Url.Query, "").Replace("https://", "http://");
bodystr += "?menuid=" + Common.GetLoginMenuID()
+ "&URef=" + Server.UrlEncode(Common.RemoveMobileAuthenticationURI(Common.RequestUrlRewrite("URef,MPUID,__redir,__ufps", ",,,"))) //ログイン後戻り先、不要なパラメータは削除
+ "&URefID=" + this.MenuID //ページタイトル表示のため
+ "&username=";
bodystr += "\n末尾の\"username=\"に続けてアカウントを記述できます。\n";
}
MailLink.NavigateUrl = "mailto:" + "?subject=" + Server.UrlEncode(subjectstr) + "&body=" + Server.UrlEncode(bodystr);
//レンダリング計算値を計算して追加する。
this.RenderedWeight = this.ModuleWeight; //ModuleWeightにはモジュール別アンカーのレンダリング量は加算済み。
//イメージ計算値を計算して追加する。
this.RenderedImageWeight = this.ImageWeight;
this.RenderedWeight += MailLink.NavigateUrl.Length;
}
}
</script>
<mportal:title runat="server" moduleweight="150" id="ModuleTitle" />
<hr></hr>
<div align=right>
<asp:hyperlink id="MailLink" runat="server">このURLをメールで知らせる</asp:hyperlink>
</div>