📄 advs_right.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( 25 );
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\r\n</head>\r\n\r\n<body class=\"NormalPage\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n <tr> \r\n <td width=\"150\" > <img src=\"images/bar.gif\" > ";
echo $strAdvsRight;
echo "</td>\r\n <td > </td> <td width=\"100\" > </td>\r\n </tr>\r\n </table>\r\n";
$step = $_REQUEST['step'];
$menuid = $_REQUEST['menuid'];
if ( !isset( $menuid ) || $menuid == "" )
{
$menuid = "1";
}
if ( $step == "modify" )
{
$id = $_POST['id'];
$hidden = $_POST['hidden'];
$title = $_POST['title'];
$border = $_POST['border'];
$width = $_POST['width'];
$height = $_POST['height'];
$url = $_POST['url'];
$toppadding = $_POST['toppadding'];
$sidepadding = $_POST['sidepadding'];
$target = $_POST['target'];
$pic = $_FILES['pic'];
if ( 0 < $pic['size'] )
{
$msql->query( "select src from {$tbl_advs_right} where menuid='{$menuid}'" );
if ( $msql->next_record( ) )
{
$src = $msql->f( "src" );
}
$fname = "../".$src;
if ( $src != "" && 9 < strlen( $src ) && $src != "images/jiao.gif" && file_exists( $fname ) )
{
@unlink( $fname );
}
$arr = uploadimage( $pic['tmp_name'], $pic['type'], $pic['size'], "advs" );
$msql->query( "update {$tbl_advs_right} set\r\n\t\thidden = '{$hidden}',\r\n\t\ttitle = '{$title}',\r\n\t\tborder = '{$border}',\r\n\t\twidth = '{$arr['0']}',\r\n\t\theight = '{$arr['1']}',\r\n\t\ttype = '{$arr['2']}',\r\n\t\tsrc = '{$arr['3']}',\r\n\t\turl = '{$url}',\r\n\t\ttoppadding = '{$toppadding}',\r\n\t\tsidepadding = '{$sidepadding}',\r\n\t\ttarget = '{$target}' \r\n\t\twhere menuid = '{$menuid}'\r\n\t\t" );
sayok( $strModifyOk, "advs_right.php?menuid=".$menuid, "" );
}
else
{
$msql->query( "update {$tbl_advs_right} set\r\n\t\thidden = '{$hidden}',\r\n\t\ttitle = '{$title}',\r\n\t\tborder = '{$border}',\r\n\t\twidth = '{$width}',\r\n\t\theight = '{$height}',\r\n\t\turl = '{$url}',\r\n\t\ttoppadding = '{$toppadding}',\r\n\t\tsidepadding = '{$sidepadding}',\r\n\t\ttarget = '{$target}' \r\n\t\twhere menuid = '{$menuid}' " );
sayok( $strModifyOk, "advs_right.php?menuid=".$menuid, "" );
}
}
$msql->query( "select * from {$tbl_advs_right} where menuid='{$menuid}'" );
if ( $msql->next_record( ) )
{
$id = $msql->f( "id" );
$title = $msql->f( "title" );
$hidden = $msql->f( "hidden" );
$border = $msql->f( "border" );
$width = $msql->f( "width" );
$height = $msql->f( "height" );
$type = $msql->f( "type" );
$url = $msql->f( "url" );
$src = $msql->f( "src" );
$target = $msql->f( "target" );
$toppadding = $msql->f( "toppadding" );
$sidepadding = $msql->f( "sidepadding" );
}
else
{
$title = "";
$hidden = "1";
$border = "0";
$width = "75";
$height = "75";
$type = "gif";
$url = "http://";
$src = "images/jiao.gif";
$target = "_self";
$toppadding = "5";
$sidepadding = "5";
$msql->query( "insert into {$tbl_advs_right} set\r\n\t\thidden = '{$hidden}',\r\n\t\ttitle = '{$title}',\r\n\t\tborder = '{$border}',\r\n\t\twidth = '{$width}',\r\n\t\theight = '{$height}',\r\n\t\ttype = '{$type}',\r\n\t\tsrc = '{$src}',\r\n\t\turl = '{$url}',\r\n\t\ttoppadding = '{$toppadding}',\r\n\t\tsidepadding = '{$sidepadding}',\r\n\t\ttarget = '{$target}',\r\n\t\tmenuid = '{$menuid}'\r\n\t\t" );
}
echo " \r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" align=\"center\">\r\n <form name=\"advs_right.php\" action=\"\" method=\"post\" enctype=\"multipart/form-data\">\r\n <tr> \r\n <td align=\"right\" class=\"title\" width=\"90\" height=\"26\">";
echo $strAdvsColtype;
echo "</td>\r\n <td class=\"con\" width=\"200\"> ";
echo selcoltype( );
echo " </td>\r\n <td align=\"right\" class=\"title\" width=\"90\">";
echo $strAdvsName;
echo "</td>\r\n <td class=\"con\" width=\"200\">\r\n <input type=\"text\" name=\"title\" size=\"20\" value=\"";
echo $title;
echo "\" class=input>\r\n </td>\r\n </tr>\r\n <tr> \r\n <td align=\"right\" class=\"title\" width=\"90\" height=\"26\">";
echo $strAdvsIfShow;
echo "</td>\r\n <td class=\"con\" width=\"200\"> \r\n ";
echo "<s";
echo "elect name=\"hidden\">\r\n <option value=\"0\" ";
echo seld( $hidden, 0 );
echo ">";
echo $strShow;
echo "</option>\r\n <option value=\"1\" ";
echo seld( $hidden, 1 );
echo ">";
echo $strHidden;
echo "</option>\r\n </select>\r\n </td>\r\n <td align=\"right\" class=\"title\" width=\"90\">";
echo $strAdvsTarget;
echo "</td>\r\n <td class=\"con\" width=\"200\"> \r\n ";
echo "<s";
echo "elect name=\"target\">\r\n <option value=\"_blank\" ";
echo seld( $target, "_blank" );
echo ">";
echo $strBlank;
echo "</option>\r\n <option value=\"_self\" ";
echo seld( $target, "_self" );
echo ">";
echo $strSelf;
echo "</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr> \r\n <td align=\"right\" class=\"title\" width=\"90\" height=\"26\">";
echo $strUrl;
echo "</td>\r\n <td class=\"con\" width=\"200\"> \r\n <input name=\"url\" type=\"text\" value=\"";
echo $url;
echo "\" size=\"20\" class=input>\r\n </td>\r\n <td align=\"right\" class=\"title\" width=\"90\">";
echo $strLogoBorder;
echo "</td>\r\n <td class=\"con\" width=\"200\"> \r\n <input name=\"border\" type=\"text\" value=\"";
echo $border;
echo "\" size=\"2\" class=input>\r\n PX </td>\r\n </tr>\r\n <tr> \r\n <td align=\"right\" class=\"title\" width=\"90\" height=\"26\">";
echo $strLogoWidth;
echo "</td>\r\n <td class=\"con\" width=\"200\"> \r\n <input name=\"width\" type=\"text\" size=\"3\" value=\"";
echo $width;
echo "\" class=input>\r\n PX </td>\r\n <td align=\"right\" class=\"title\" width=\"90\">";
echo $strLogoHeight;
echo "</td>\r\n <td class=\"con\" width=\"200\"> \r\n <input name=\"height\" type=\"text\" size=\"3\" value=\"";
echo $height;
echo "\" class=input>\r\n PX </td>\r\n </tr>\r\n <tr> \r\n <td align=\"right\" class=\"title\" width=\"90\" height=\"26\">";
echo $strAdvsPaddingBottom;
echo "</td>\r\n <td class=\"con\"> \r\n <input name=\"toppadding\" type=\"text\" value=\"";
echo $toppadding;
echo "\" size=\"3\" class=input>\r\n PX </td>\r\n <td class=\"title\" align=\"right\" width=\"90\">";
echo $strAdvsPaddingRight;
echo "</td>\r\n <td class=\"con\"> \r\n <input name=\"sidepadding\" type=\"text\" value=\"";
echo $sidepadding;
echo "\" size=\"3\" class=input>\r\n PX</td>\r\n </tr>\r\n <tr> \r\n <td align=\"right\" class=\"title\" width=\"90\" height=\"26\">";
echo $strAdvsUpload;
echo "</td>\r\n <td class=\"con\" colspan=\"3\"> \r\n <input type=\"file\" name=\"pic\" size=\"28\" class=input>\r\n </td>\r\n </tr>\r\n <tr align=\"center\"> \r\n <td class=\"title\" colspan=\"4\" height=\"26\">";
echo $strAdvsNowPic;
echo "</td>\r\n </tr>\r\n <tr align=\"center\"> \r\n <td class=\"con\" colspan=\"4\" height=\"26\">";
$src = "../".$src;
echo showtypeimage( $src, $type, $width, $height, $border );
echo "</td>\r\n </tr>\r\n <tr align=\"center\"> \r\n <td colspan=\"4\" class=\"title\" height=\"26\"> \r\n <input type=\"submit\" name=\"Submit\" value=\"";
echo $strSubmit;
echo "\" class=button>\r\n <input type=\"hidden\" name=\"id\" value=\"";
echo $id;
echo "\">\r\n\t\t<input type=\"hidden\" name=\"menuid\" value=\"";
echo $menuid;
echo "\">\r\n <input name=\"step\" type=\"hidden\" id=\"submit\" value=\"modify\">\r\n </td>\r\n </tr>\r\n </form>\r\n</table>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -