本文整理匯總了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();
?>