📄 news_con.php
字号:
<?php
include( "../config.inc.php" );
include( "../includes/SysGlobal.php" );
include( "language/".$aLan."_".$charset.".php" );
include( "../includes/version.php" );
include( "../includes/pro.php" );
include( "func/adm.inc.php" );
include( "func/common.inc.php" );
include( "func/db.inc.php" );
include( "func/nocatch.php" );
needauth( 21 );
$menuid = $_REQUEST['menuid'];
$pid = $_REQUEST['pid'];
$page = $_REQUEST['page'];
$step = $_REQUEST['step'];
$id = $_REQUEST['id'];
$title = $_REQUEST['title'];
$xuhao = $_REQUEST['xuhao'];
$tj = $_REQUEST['tj'];
$iffb = $_REQUEST['iffb'];
$ifbold = $_REQUEST['ifbold'];
$ifred = $_REQUEST['ifred'];
$key = $_REQUEST['key'];
$secure = $_REQUEST['secure'];
$showtj = $_REQUEST['showtj'];
$showfb = $_REQUEST['showfb'];
$shownum = $_REQUEST['shownum'];
$sc = $_REQUEST['sc'];
$ord = $_REQUEST['ord'];
$bg = $_REQUEST['bg'];
if ( !isset( $pid ) || $pid == "" )
{
$pid = 0;
$cname = $strConTopCat;
$dis = " disabled";
}
if ( !isset( $shownum ) || $shownum < 10 )
{
$shownum = 10;
}
echo "<html>\r\n<head >\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $charset;
echo "\">\r\n<link id=\"style_sheet\" href=\"css/commonstyle.css\" type=\"text/css\" rel=\"stylesheet\">\r\n<title>";
echo $strAdminTitle;
echo "</title>\r\n\r\n ";
echo "<S";
echo "CRIPT>\r\nfunction cm(nn){\r\n\tqus=confirm(\"";
echo $strDeleteConfirm;
echo "\")\r\n\tif(qus!=0){\r\n\t\twindow.location='news_con.php?step=del&id='+nn+'&menuid=";
echo $menuid;
echo "&pid=";
echo $pid;
echo "&page=";
echo $page;
echo "&sc=";
echo $sc;
echo "&ord=";
echo $ord;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "';\r\n\t}\r\n}\r\n\r\nfunction Dpop(url,w,h){\r\n\tres = showModalDialog(url, null, 'dialogWidth: '+w+'px; dialogHeight: '+h+'px; center: yes; resizable: no; scroll: no; status: no;');\r\n \tif(res==\"ok\"){window.location.reload();}\r\n \r\n}\r\nfunction ord(nn,sc){\r\nif(nn!='";
echo "{$ord}";
echo "'){\r\n\twindow.location='news_con.php?page=";
echo $page;
echo "&menuid=";
echo $menuid;
echo "&sc=";
echo $sc;
echo "&pid=";
echo $pid;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "&ord='+nn;\r\n}else{\r\n\tif(sc=='asc' || sc==''){\r\n\twindow.location='news_con.php?page=";
echo "{$page}";
echo "&menuid=";
echo $menuid;
echo "&sc=desc&pid=";
echo $pid;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "&ord='+nn;\r\n\t}else{\r\n\twindow.location='news_con.php?page=";
echo "{$page}";
echo "&menuid=";
echo $menuid;
echo "&sc=asc&pid=";
echo $pid;
echo "&showtj=";
echo $showtj;
echo "&showfb=";
echo $showfb;
echo "&shownum=";
echo $shownum;
echo "&ord='+nn;\r\n\t}\r\n\r\n}\r\n\r\n\r\n}\r\n\r\nfunction SelAll(theForm){\r\n\t\tfor ( i = 0 ; i < theForm.elements.length ; i ++ )\r\n\t\t{\r\n\t\t\tif ( theForm.elements[i].type == \"checkbox\" && theForm.elements[i].name != \"SELALL\" )\r\n\t\t\t{\r\n\t\t\t\ttheForm.elements[i].checked = ! theForm.elements[i].checked ;\r\n\t\t\t}\r\n\t\t}\r\n}\r\nfunction setColor(){\r\n\tvar arr = showModalDialog(\"colorPicker.htm\", \"\", \"dialogWidth:379px; dialogHeight:208";
echo "px; status:0;scroll:0;help:0;\");\r\n\tif (arr != null){\r\n\t\tdelfm.bg.value = arr;\r\n\t\tevent.srcElement.style.backgroundColor = arr;\r\n\t}\r\n}\r\n\r\n var sInitColor;\r\n\r\n function callColorDlg(){\r\n if(sInitColor == null)\r\n var sColor = dlgHelper.ChooseColorDlg();\r\n else\r\n var sColor = dlgHelper.ChooseColorDlg(sInitColor);\r\n\r\n sColor = sColor.toString(16);\r\n if (sColor.length < 6) {\r\n var sTempString =";
echo " \"000000\".substring(0,6-sColor.length);\r\n sColor = sTempString.concat(sColor);\r\n }\r\n\r\n event.srcElement.style.backgroundColor = '#' + sColor;\r\n delfm.bg.value = '#' + sColor;\r\n sInitColor = sColor;\r\n }\r\n \r\nfunction changecolor(color) {\r\n\tvar c = delfm.bgcolor.value;\r\n\tif (c.length > 7) {\r\n\t\talert (\"";
echo $strHtmlMarqueeNotice2;
echo "\");\r\n\t\treturn false\r\n\t} else {\r\n\t\t\r\n\t\tdocument.all[color].style.backgroundColor = c;\r\n\t}\r\n}\r\n\r\n\r\n</SCRIPT>\r\n</head>\r\n\r\n<body class=\"NormalPage\">\r\n";
if ( $step == "fball" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_news_con} set iffb='1' where id='{$ids}'" );
}
}
if ( $step == "notfball" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_news_con} set iffb='0' where id='{$ids}'" );
}
}
if ( $step == "tjall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_news_con} set tj='1' where id='{$ids}'" );
}
}
if ( $step == "nottjall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_news_con} set tj='0' where id='{$ids}'" );
}
}
if ( $step == "boldall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_news_con} set ifbold='1' where id='{$ids}'" );
}
}
if ( $step == "notboldall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_news_con} set ifbold='0' where id='{$ids}'" );
}
}
if ( $step == "redall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_news_con} set ifred='{$bg}' where id='{$ids}'" );
}
}
if ( $step == "notredall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "update {$tbl_news_con} set ifred='0' where id='{$ids}'" );
}
}
if ( $step == "delall" )
{
$dall = $_POST['dall'];
$nums = sizeof( $dall );
$i = 0;
for ( ; $i < $nums; $i++ )
{
$ids = $dall[$i];
$msql->query( "select catpath,src from {$tbl_news_con} where id='{$ids}'" );
if ( $msql->next_record( ) )
{
$delcatpath = $msql->f( "catpath" );
$src = $msql->f( "src" );
}
mincatnums( $tbl_news_cat, $delcatpath );
if ( file_exists( "../".$src ) && $src != "" )
{
unlink( "../".$src );
}
$msql->query( "delete from {$tbl_news_con} where id='{$ids}'" );
$fold = menufold( $menuid );
@unlink( "../".$fold."/html/".$ids.".html" );
}
}
if ( $step == "del" )
{
$msql->query( "select catpath,src from {$tbl_news_con} where id='{$id}'" );
if ( $msql->next_record( ) )
{
$delcatpath = $msql->f( "catpath" );
$src = $msql->f( "src" );
}
mincatnums( $tbl_news_cat, $delcatpath );
if ( file_exists( "../".$src ) && $src != "" )
{
unlink( "../".$src );
}
$msql->query( "delete from {$tbl_news_con} where id='{$id}'" );
$fold = menufold( $menuid );
@unlink( "../".$fold."/html/".$id.".html" );
}
echo "\r\n";
if ( !isset( $ord ) || $ord == "" )
{
$ord = "id";
}
if ( !isset( $sc ) || $sc == "" )
{
$sc = "desc";
}
$scl = " menuid='{$menuid}' ";
if ( $key != "" )
{
$scl .= " and (title regexp '{$key}' or body regexp '{$key}') ";
}
if ( $showtj != "" && $showtj != "all" )
{
$scl .= " and tj='{$showtj}' ";
}
if ( $showfb != "" && $showfb != "all" )
{
$scl .= " and iffb='{$showfb}' ";
}
if ( $pid != "0" && $pid != "" )
{
$fmdpath = fmpath( $pid );
$scl .= " and catpath regexp '{$fmdpath}' ";
}
$totalnums = tblcount( $tbl_news_con, "id", $scl );
$pages = new pages( );
$pages->setvar( array(
"menuid" => $menuid,
"shownum" => $shownum,
"pid" => $pid,
"sc" => $sc,
"ord" => $ord,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -