myWin .= "\r\n";
$this->formName = $formname;
$this->myWin .= "
\r\n";
}
}
/**
* 增加自定义JS脚本
*
* @param string $scripts
* @return void
*/
function SetCheckScript($scripts)
{
$pos = strpos($this->myWin,$this->tmpCode);
if($pos > 0)
{
$this->myWin = substr_replace($this->myWin,$scripts,$pos,strlen($this->tmpCode));
}
}
/**
* 获取窗口
*
* @param string $wintype 菜单类型
* @param string $msg 短消息
* @param bool $isform 是否是表单
* @return string
*/
function GetWindow($wintype="save", $msg="", $isform=true)
{
global $cfg_static_dir;
$this->StartWin();
$this->myWin .= $this->myWinItem;
if($wintype!="")
{
if($wintype!="hand")
{
$this->myWin .= "
|
";
}
else
{
if($msg!='')
{
$this->myWin .= "$msg |
";
}
else
{
$this->myWin .= '';
}
}
}
$this->CloseWin($isform);
return $this->myWin;
}
/**
* 显示页面
*
* @access public
* @param string $modfile 模型模板
* @return string
*/
function Display($modfile="")
{
global $cfg_templets_dir,$wecome_info,$cfg_basedir;
if(empty($wecome_info))
{
$wecome_info = "DedeCMS OX 通用对话框:";
}
$ctp = new DedeTagParse();
if($modfile=='')
{
$ctp->LoadTemplate($cfg_basedir.$cfg_templets_dir.'/plus/win_templet.htm');
}
else
{
$ctp->LoadTemplate($modfile);
}
$emnum = $ctp->Count;
for($i=0;$i<=$emnum;$i++)
{
if(isset($GLOBALS[$ctp->CTags[$i]->GetTagName()]))
{
$ctp->Assign($i,$GLOBALS[$ctp->CTags[$i]->GetTagName()]);
}
}
$ctp->Display();
$ctp->Clear();
}
} //End Class
/**
* 显示一个不带表单的普通提示
*
* @access public
* @param string $msg 消息提示信息
* @param string $title 提示标题
* @return string
*/
function ShowMsgWin($msg, $title)
{
$win = new OxWindow();
$win->Init();
$win->mainTitle = "DeDeCMS系统提示:";
$win->AddTitle($title);
$win->AddMsgItem("$msg
");
$winform = $win->GetWindow("hand");
$win->Display();
}