📄 advs_float.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</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 $strAdvsFloat;
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'];
$float_width = $_POST['float_width'];
$float_height = $_POST['float_height'];
$float_advs_type = $_POST['float_advs_type'];
$src = $_POST['src'];
$float_url = $_POST['float_url'];
$float_target = $_POST['float_target'];
$float_speed = $_POST['float_speed'];
$hidden = $_POST['hidden'];
$pic = $_FILES['pic'];
if ( 0 < $pic['size'] )
{
$msql->query( "select src from {$tbl_advs_float} where menuid='{$menuid}'" );
if ( $msql->next_record( ) )
{
$src = $msql->f( "src" );
}
$fname = "../".$src;
if ( $src != "" && 9 < strlen( $src ) && $src != "images/float.gif" && file_exists( $fname ) )
{
@unlink( $fname );
}
$arr = uploadimage( $pic['tmp_name'], $pic['type'], $pic['size'], "advs" );
$msql->query( "update {$tbl_advs_float} set\r\n\t\thidden = '{$hidden}',\r\n\t\ttitle = '{$title}',\r\n\t\tborder = '{$border}',\r\n\t\tfloat_width = '{$arr['0']}',\r\n\t\tfloat_height = '{$arr['1']}',\r\n\t\tfloat_advs_type = '{$arr['2']}',\r\n\t\tsrc = '{$arr['3']}',\r\n\t\tfloat_url = '{$float_url}',\r\n\t\tfloat_target = '{$float_target}',\r\n\t\tfloat_speed = '{$float_speed}' where menuid = '{$menuid}'\r\n\t\t" );
sayok( $strModifyOk, "advs_float.php?menuid=".$menuid, "" );
}
else
{
$msql->query( "update {$tbl_advs_float} set\r\n\t\thidden = '{$hidden}',\r\n\t\ttitle = '{$title}',\r\n\t\tborder = '{$border}',\r\n\t\tfloat_width = '{$float_width}',\r\n\t\tfloat_height = '{$float_height}',\r\n\t\tfloat_url = '{$float_url}',\r\n\t\tfloat_target = '{$float_target}',\r\n\t\tfloat_speed = '{$float_speed}' where menuid = '{$menuid}'\r\n\t\t" );
sayok( $strModifyOk, "advs_float.php?menuid=".$menuid, "" );
}
}
$msql->query( "select * from {$tbl_advs_float} where menuid='{$menuid}'" );
if ( $msql->next_record( ) )
{
$id = $msql->f( "id" );
$title = $msql->f( "title" );
$hidden = $msql->f( "hidden" );
$border = $msql->f( "border" );
$float_width = $msql->f( "float_width" );
$float_height = $msql->f( "float_height" );
$float_advs_type = $msql->f( "float_advs_type" );
$float_url = $msql->f( "float_url" );
$float_src = $msql->f( "src" );
$float_target = $msql->f( "float_target" );
$float_speed = $msql->f( "float_speed" );
}
else
{
$title = "";
$hidden = "1";
$border = "0";
$float_width = "100";
$float_height = "100";
$float_advs_type = "gif";
$float_url = "http://";
$float_src = "images/float.gif";
$float_target = "_self";
$float_speed = "100";
$fsql->query( "insert into {$tbl_advs_float} set\r\n\t\thidden = '{$hidden}',\r\n\t\ttitle = '{$title}',\r\n\t\tborder = '{$border}',\r\n\t\tfloat_width = '{$float_width}',\r\n\t\tfloat_height = '{$float_height}',\r\n\t\tfloat_advs_type = '{$float_advs_type}',\r\n\t\tsrc = '{$float_src}',\r\n\t\tfloat_url = '{$float_url}',\r\n\t\tfloat_target = '{$float_target}',\r\n\t\tfloat_speed = '{$float_speed}',\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_float.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=\"float_target\">\r\n <option value=\"_blank\" ";
echo seld( $float_target, "_blank" );
echo ">";
echo $strBlank;
echo "</option>\r\n <option value=\"_self\" ";
echo seld( $float_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=\"float_url\" type=\"text\" value=\"";
echo $float_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=\"float_width\" type=\"text\" size=\"3\" value=\"";
echo $float_width;
echo "\">\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=\"float_height\" type=\"text\" size=\"3\" value=\"";
echo $float_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 $strAdvsUpload;
echo "</td>\r\n <td class=\"con\"> \r\n <input type=\"file\" name=\"pic\" size=\"16\" class=input>\r\n </td>\r\n <td class=\"title\" align=\"right\" width=\"90\">";
echo $strAdvsFloatPL;
echo "</td>\r\n <td class=\"con\"> \r\n <input name=\"float_speed\" type=\"text\" value=\"";
echo $float_speed;
echo "\" size=\"3\" 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\">";
$float_src = "../".$float_src;
echo showtypeimage( $float_src, $float_advs_type, $float_width, $float_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 + -