📄 template.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/function_page_02.php" );
include_once( "inc/utility_all.php" );
echo "<html>\r\n<head>\r\n<title>选择模版</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n\r\n";
echo "<S";
echo "CRIPT>\r\n<!--\r\n\r\nvar menu_enter=\"\";\r\n\r\nfunction borderize_on(e)\r\n{\r\n color=\"#708DDF\";\r\n source3=event.srcElement\r\n\r\n if(source3.className==\"menulines\" && source3!=menu_enter)\r\n source3.style.backgroundColor=color;\r\n}\r\n\r\nfunction borderize_on1(e)\r\n{\r\n for (i=0; i<document.all.length; i++)\r\n { document.all(i).style.borderColor=\"\";\r\n document.all(i).style.backgroundColor=\"\";\r\n document.all(i).sty";
echo "le.color=\"\";\r\n document.all(i).style.fontWeight=\"\";\r\n }\r\n\r\n color=\"#003FBF\";\r\n source3=event.srcElement\r\n\r\n if(source3.className==\"menulines\")\r\n { source3.style.borderColor=\"black\";\r\n source3.style.backgroundColor=color;\r\n source3.style.color=\"white\";\r\n source3.style.fontWeight=\"bold\";\r\n }\r\n\r\n menu_enter=source3;\r\n}\r\n\r\nfunction borderize_off(e)\r\n{\r\n source4=event.srcElement\r\n\r\n if(source4.";
echo "className==\"menulines\" && source4!=menu_enter)\r\n {source4.style.backgroundColor=\"\";\r\n source4.style.borderColor=\"\";\r\n }\r\n}\r\n\r\n//-->\r\n</SCRIPT>";
echo "<s";
echo "cript Language=\"JavaScript\">\r\nvar parent_window = parent.dialogArguments;\r\n\r\nfunction click_model(ID)\r\n{\r\n ";
$js_html = "\t if(!window.confirm(\"选择模板后将覆盖编辑器中的内容,确定吗?\")){\r\n\t return;\r\n }";
if ( $_REQUEST['typeh'] == 1 )
{
echo $js_html;
}
echo "\r\n \r\n\r\n targetelement=document.all(ID);\r\n \r\n // parent_window.alert(targetelement.value);\r\n parent_window.SetHtmlTemplate(targetelement.value);\r\n \r\n window.close();\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"5\" >\r\n<tr class=\"TableHeader\" >\r\n <td colspan=\"2\"><b>选择模版</b></td>\r\n</tr>\r\n";
$sql = "SELECT * FROM template_html ";
switch ( $_REQUEST['order'] )
{
case "name" :
$sql .= " ORDER BY TPL_THREAD";
break;
case "general" :
$sql .= " ORDER BY TPL_GENERAL";
break;
default :
$sql .= " ORDER BY TPl_ID";
break;
}
$sql .= $_REQUEST['sens'] ? " ASC" : " DESC";
$sql = page( $sql, 4 );
$rs = exequery( $connection, $sql );
$tplc = 0;
while ( $row = mysql_fetch_array( $rs ) )
{
$tpl_id = $row['TPL_ID'];
$tpl_thread = $row['TPL_THREAD'];
$tpl_general = $row['TPL_GENERAL'];
$tpl_content = $row['TPL_CONTENT'];
$tpl_aid = $row['ATTACHMENT_ID'];
$tpl_name = $row['ATTACHMENT_NAME'];
$tpl_content = str_replace( "\"", "'", $tpl_content );
$tpl_content = str_replace( "\r\n", " ", $tpl_content );
$tpl_aid_array = explode( ",", $tpl_aid );
$tpl_aname_array = explode( "*", $tpl_name );
unset( $img_id );
unset( $img_name );
while ( list( $key, $var ) = each( $tpl_aid_array ) )
{
if ( $var == "" )
{
}
else
{
$img_id = $var;
}
}
while ( list( $key, $var ) = each( $tpl_aname_array ) )
{
if ( $var == "" )
{
}
else
{
$img_name = $var;
}
}
if ( $img_id == "" )
{
$imgsrc = "/images/noicon.gif";
}
else
{
$imgsrc = "/attachment/{$img_id}/{$img_name}";
}
++$tplc;
if ( $tplc % 2 == 1 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
echo "\r\n<tr class=\"";
echo $TableLine;
echo "\" onclick=javascript:click_model('";
echo $tpl_id;
echo "') style=\"cursor:hand\">\r\n <td width=\"105\">\r\n <img src=\"";
echo $imgsrc;
echo "\" width=\"100\" height=\"70\">\r\n </td>\r\n <td>\r\n \t<b>";
echo $tpl_thread;
echo "</b><br><input type=\"hidden\" name=\"";
echo $tpl_id;
echo "\" value=\"";
echo $tpl_content;
echo "\">\r\n\t";
echo $tpl_general;
echo " </td>\r\n</tr>\r\n";
}
echo "\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">\r\n <tr>\r\n <td align=\"right\">";
disp( "sens=".$_REQUEST['sens']."&order=".$_REQUEST['order'] );
echo "</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -