📄 manage_group_settings1.php
字号:
<?php
include "logincheck.php";
include_once "myconnect.php";
$errcnt=0;
if(count($_POST)>0)
{
$sb_sell_cnt=$_REQUEST["sb_sell_cnt"];
$sb_buy_cnt=$_REQUEST["sb_buy_cnt"];
$sb_product_cnt=$_REQUEST["sb_product_cnt"];
$sb_profile=$_REQUEST["sb_profile"];
$sb_img_cnt=$_REQUEST["sb_img_cnt"];
$sb_cat_cnt=$_REQUEST["sb_cat_cnt"];
$sb_profilecat_cnt=$_REQUEST["sb_profilecat_cnt"];
$sb_posturl=$_REQUEST["sb_posturl"];
$sb_keyword_cnt=$_REQUEST["sb_keyword_cnt"];
$sb_sell_cnt1=$_REQUEST["sb_sell_cnt1"];
$sb_buy_cnt1=$_REQUEST["sb_buy_cnt1"];
$sb_product_cnt1=$_REQUEST["sb_product_cnt1"];
$sb_profile1=$_REQUEST["sb_profile1"];
$sb_img_cnt1=$_REQUEST["sb_img_cnt1"];
$sb_cat_cnt1=$_REQUEST["sb_cat_cnt1"];
$sb_profilecat_cnt1=$_REQUEST["sb_profilecat_cnt1"];
$sb_posturl1=$_REQUEST["sb_posturl1"];
$sb_keyword_cnt1=$_REQUEST["sb_keyword_cnt1"];
$sb_sell_cnt2=$_REQUEST["sb_sell_cnt2"];
$sb_buy_cnt=$_REQUEST["sb_buy_cnt2"];
$sb_product_cnt2=$_REQUEST["sb_product_cnt2"];
$sb_profile2=$_REQUEST["sb_profile2"];
$sb_img_cnt2=$_REQUEST["sb_img_cnt2"];
$sb_cat_cnt2=$_REQUEST["sb_cat_cnt2"];
$sb_profilecat_cnt2=$_REQUEST["sb_profilecat_cnt2"];
$sb_posturl2=$_REQUEST["sb_posturl2"];
$sb_keyword_cnt2=$_REQUEST["sb_keyword_cnt2"];
if( !is_numeric($sb_sell_cnt) || ($sb_sell_cnt < 0))
{
$errs[$errcnt]="Maximum sell offers allowed for Gold must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_sell_cnt1) || ($sb_sell_cnt1 < 0))
{
$errs[$errcnt]="Maximum sell offers allowed for Silver must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_sell_cnt2) || ($sb_sell_cnt2 < 0))
{
$errs[$errcnt]="Maximum sell offers allowed for Bronze must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_buy_cnt) || ($sb_buy_cnt < 0))
{
$errs[$errcnt]="Maximum buy offers allowed for Gold must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_buy_cnt1) || ($sb_buy_cnt1 < 0))
{
$errs[$errcnt]="Maximum buy offers allowed for Silver must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_buy_cnt2) || ($sb_buy_cnt2 < 0))
{
$errs[$errcnt]="Maximum buy offers allowed for Bronze must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_product_cnt) || ($sb_product_cnt < 0))
{
$errs[$errcnt]="Maximum product catalogs allowed for Gold must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_product_cnt1) || ($sb_product_cnt1 < 0))
{
$errs[$errcnt]="Maximum product catalogs allowed for Silver must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_product_cnt2) || ($sb_product_cnt2 < 0))
{
$errs[$errcnt]="Maximum product catalogs allowed for Bronze must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_keyword_cnt) || ($sb_keyword_cnt < 0))
{
$errs[$errcnt]="Maximum keywords allowed for Gold must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_keyword_cnt1) || ($sb_keyword_cnt1 < 0))
{
$errs[$errcnt]="Maximum keywords allowed for Silver must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_keyword_cnt2) || ($sb_keyword_cnt2 < 0))
{
$errs[$errcnt]="Maximum keywords allowed for Bronze must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_img_cnt) || ($sb_img_cnt < 0))
{
$errs[$errcnt]="Maximum images allowed for Gold must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_img_cnt1) || ($sb_img_cnt1 < 0))
{
$errs[$errcnt]="Maximum images allowed for Silver must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_img_cnt2) || ($sb_img_cnt2 < 0))
{
$errs[$errcnt]="Maximum images allowed for Bronze must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_profilecat_cnt) || ($sb_profilecat_cnt < 0))
{
$errs[$errcnt]="Maximum categories allowed to post profiles for Gold must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_profilecat_cnt1) || ($sb_profilecat_cnt1 < 0))
{
$errs[$errcnt]="Maximum categories allowed to post profiles for Silver must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_profilecat_cnt2) || ($sb_profilecat_cnt2 < 0))
{
$errs[$errcnt]="Maximum categories allowed to post profiles for Bronze must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_cat_cnt) || ($sb_cat_cnt < 0))
{
$errs[$errcnt]="Maximum categories allowed to post sell/buy offers for Gold must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_cat_cnt1) || ($sb_cat_cnt1 < 0))
{
$errs[$errcnt]="Maximum categories allowed to post sell/buy offers for Silver must be a positive integer";
$errcnt++;
}
if( !is_numeric($sb_cat_cnt2) || ($sb_cat_cnt2 < 0))
{
$errs[$errcnt]="Maximum categories allowed to post sell/buy offers for Bronze must be a positive integer";
$errcnt++;
}
if($errcnt == 0)
{
if( mysql_affected_rows() >= 1 )
{
header("Location: adminhome.php?msg=".urlencode("Member options have been configured"));
die();
}
else
{
header("Location: adminhome.php?msg=".urlencode("Unable to update member options, please try again"));
die();
}
} //end if errcnt == 0
}// end if form posted
else
{ //first time rendering
$sbrow1_gro=mysql_fetch_array(mysql_query("select * from sbbleads_groups where sb_memtype=1"));
$sb_sell_cnt=$sbrow1_gro["sb_sell_cnt"];
$sb_buy_cnt=$sbrow1_gro["sb_buy_cnt"];
$sb_product_cnt=$sbrow1_gro["sb_product_cnt"];
$sb_profile=$sbrow1_gro["sb_profile"];
$sb_img_cnt=$sbrow1_gro["sb_img_cnt"];
$sb_cat_cnt=$sbrow1_gro["sb_cat_cnt"];
$sb_profilecat_cnt=$sbrow1_gro["sb_profilecat_cnt"];
$sb_posturl=$sbrow1_gro["sb_posturl"];
$sb_keyword_cnt=$sbrow1_gro["sb_keyword_cnt"];
$sbrow1_gro=mysql_fetch_array(mysql_query("select * from sbbleads_groups where sb_memtype=2"));
$sb_sell_cnt1=$sbrow1_gro["sb_sell_cnt"];
$sb_buy_cnt1=$sbrow1_gro["sb_buy_cnt"];
$sb_product_cnt1=$sbrow1_gro["sb_product_cnt"];
$sb_profile1=$sbrow1_gro["sb_profile"];
$sb_img_cnt1=$sbrow1_gro["sb_img_cnt"];
$sb_cat_cnt1=$sbrow1_gro["sb_cat_cnt"];
$sb_profilecat_cnt1=$sbrow1_gro["sb_profilecat_cnt"];
$sb_posturl1=$sbrow1_gro["sb_posturl"];
$sb_keyword_cnt1=$sbrow1_gro["sb_keyword_cnt"];
$sbrow1_gro=mysql_fetch_array(mysql_query("select * from sbbleads_groups where sb_memtype=3"));
$sb_sell_cnt2=$sbrow1_gro["sb_sell_cnt"];
$sb_buy_cnt2=$sbrow1_gro["sb_buy_cnt"];
$sb_product_cnt2=$sbrow1_gro["sb_product_cnt"];
$sb_profile2=$sbrow1_gro["sb_profile"];
$sb_img_cnt2=$sbrow1_gro["sb_img_cnt"];
$sb_cat_cnt2=$sbrow1_gro["sb_cat_cnt"];
$sb_profilecat_cnt2=$sbrow1_gro["sb_profilecat_cnt"];
$sb_posturl2=$sbrow1_gro["sb_posturl"];
$sb_keyword_cnt2=$sbrow1_gro["sb_keyword_cnt"];
}
function main()
{
global $errs, $errcnt, $sb_sell_cnt, $sb_buy_cnt, $sb_product_cnt, $sb_profile, $sb_img_cnt, $sb_cat_cnt, $sb_profilecat_cnt, $sb_posturl, $sb_keyword_cnt, $sb_sell_cnt1, $sb_buy_cnt1, $sb_product_cnt1, $sb_profile1, $sb_img_cnt1, $sb_cat_cnt1, $sb_profilecat_cnt1, $sb_posturl1, $sb_keyword_cnt1, $sb_sell_cnt2, $sb_buy_cnt2, $sb_product_cnt2, $sb_profile2, $sb_img_cnt2, $sb_cat_cnt2, $sb_profilecat_cnt2, $sb_posturl2, $sb_keyword_cnt2;
if(count($_POST)<>0) //IF SOME FORM WAS POSTED DO VALIDATION
{
if( $errcnt != 0 )
{
// ob_end_flush();
?>
<table width="558" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif"><strong>Your Request cannot be processed due to following Reasons</strong></font></td>
</tr>
<?
for ($i=0;$i<$errcnt;$i++)
{
?>
<tr>
<td width="6%"><strong><font color="#FF0000"><?php echo $i+1; ?></font></strong></td>
<td width="94%"><font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif"><?php echo $errs[$i]; ?>
</font></td>
</tr>
<?
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -