本文整理汇总了PHP中DedeTagParse::LoadTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP DedeTagParse::LoadTemplate方法的具体用法?PHP DedeTagParse::LoadTemplate怎么用?PHP DedeTagParse::LoadTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DedeTagParse
的用法示例。
在下文中一共展示了DedeTagParse::LoadTemplate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fopen
if (is_file($file)) {
$fp = fopen($file, "r");
$content = fread($fp, filesize($file));
fclose($fp);
$content = dede_htmlspecialchars($content);
}
$contentView = "<textarea name='str' style='width:99%;height:450px;background:#ffffff;'>{$content}</textarea>\r\n";
$GLOBALS['filename'] = $filename;
$ctp = new DedeTagParse();
$ctp->LoadTemplate(DEDEADMIN . "/templets/file_edit.htm");
$ctp->display();
} else {
if ($fmdo == "newfile") {
$content = "";
$GLOBALS['filename'] = "newfile.txt";
$contentView = "<textarea name='str' style='width:99%;height:400'></textarea>\r\n";
$ctp = new DedeTagParse();
$ctp->LoadTemplate(DEDEADMIN . "/templets/file_edit.htm");
$ctp->display();
} else {
if ($fmdo == "upload") {
$ctp = new DedeTagParse();
$ctp->LoadTemplate(DEDEADMIN . "/templets/file_upload.htm");
$ctp->display();
}
}
}
}
}
}
}
示例2: Display
function Display($modfile="")
{
global $cfg_templets_dir,$cfg_basedir,$maintitle,$winform;
if(empty($this->mainTitle)) $maintitle = '通用对话框';
else $maintitle = $this->mainTitle;
if(empty($winform)) $winform = $this->myWin;
if(empty($cfg_templets_dir)) $cfg_templets_dir = dirname(__FILE__)."/../templets";
else $cfg_templets_dir = $cfg_basedir.$cfg_templets_dir;
$ctp = new DedeTagParse();
if($modfile=="") $ctp->LoadTemplate($cfg_templets_dir."/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();
}
示例3: Display
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();
}
示例4: if
@$content = fread($fp,filesize($file));
fclose($fp);
if((eregi("<html",$content) && eregi("<body",$content)) || $ishead == "yes")
{ $contentView = GetEditor("str",$content,"500","Default","string","true"); }
else
{ $contentView = GetEditor("str",$content,"500","Default","string","false"); }
$GLOBALS['filename'] = $filename;
$ctp = new DedeTagParse();
$ctp->LoadTemplate(dirname(__FILE__)."/templets/file_edit_view.htm");
$ctp->display();
}
//新建文件
else if($fmdo=="newfile")
{
$content = "";
$GLOBALS['filename'] = "newfile.txt";
$contentView = "<textarea name='str' style='width:100%;height:400'></textarea>\r\n";
$ctp = new DedeTagParse();
$ctp->LoadTemplate(dirname(__FILE__)."/templets/file_edit.htm");
$ctp->display();
}
//上传文件
else if($fmdo=="upload")
{
$ctp = new DedeTagParse();
$ctp->LoadTemplate(dirname(__FILE__)."/templets/file_upload.htm");
$ctp->display();
}
ClearAllLink();
?>