⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ads_stat.php

📁 VIP信息处理系统源码
💻 PHP
字号:
<?
include_once("../adser/top.php");

if(!empty($_REQUEST["delid"])){
	$sql="select * from ads where username='$_SESSION[adser_username]' and own_type='1' and id='$_REQUEST[delid]'";
	$rs=mysql_query($sql);
	$num=mysql_num_rows($rs);
	if($num>0){
		$row=mysql_fetch_array($rs);
		if($row["ads_stat"]=="0" && $row["admin_stat"]=="1"){
			$money=$row["money"];
			$update="update advertizer set balance=balance+$money where id='$row[adser_id]'";
			$rsup=mysql_query($update);
			if($rsup){
				$delete="delete from ads where id=$row[id]";
				$rsde=mysql_query($delete);
			}
			if($rsde){
				echo "删除广告成功!";
				fun_alert("删除广告成功!");
				fun_goto("./ads_stat.php");
				exit();
			}else{
				echo "删除广告成功!请联系管理员!";
				fun_alert("删除广告失败!请联系管理员!");
				fun_back();
				exit();
			}
		}else{
			echo "非法删除!";
			fun_alert("非法删除!");
			fun_back();
			exit();
		}
	}else{
		exit();
	}
}

$sqla="select * from ads_form where 1";
$rsa=mysql_query($sqla);
while($rowa=mysql_fetch_array($rsa)){
	$a_id=$rowa["id"];
	$arr_adsform[0][$a_id]=$rowa["s_name"];
	$arr_adsform[1][$a_id]=$rowa["type"];
	$arr_adsform[2][$a_id]=$rowa["width"];
	$arr_adsform[3][$a_id]=$rowa["height"];
}

$str_disp="";
$pagesize=$cfg_adserpagesize;
$list_count="ads where username='$_SESSION[adser_username]' and own_type='1'";
$sql="select * from ads where username='$_SESSION[adser_username]' and own_type='1' order by time desc";
include("../public/pagehead.php");
$rs=mysql_query($sql);
while($row=mysql_fetch_array($rs)){
	$formid=$row["ads_form_id"];
	$subtime=substr($row[time],0,10);
	$ads_stat=$row["ads_stat"];
	$ads_type=$row["ads_type"];
	$admin_stat=$row["admin_stat"];
	
	$str_manage="<input name=addnum type=button id=addnum class=subbt value='增加投放量' onClick=\"location='ads_addnum.php?adsid=$row[id]'\">";
	if($ads_type==3){
		$editf="leads_add.php";
		$editmodi="leads_modify.php";
	}elseif($ads_type==4){
		$editf="piads_add.php";
		$editmodi="piads_modify.php";
	}else{
		$editf="ads_add.php";
		$editmodi="ads_modify.php";
	}
	
	if($admin_stat=="1" && $ads_stat=="0"){
		$str_manage.="<input name=modify type=button id=modify class=subbt2 value='修改' onClick=\"location='$editf?edit_id=$row[id]'\">";
		$str_manage.="<input name=delete type=button id=delete class=subbt2 value='删除' onClick=\"delads_sub($row[id])\">";
	}else{
		$str_manage.="<input name=modify type=button id=modify class=subbt2 value='修改' onClick=\"location='$editmodi?edit_id=$row[id]'\">";
		$str_manage.="<input name=delete type=button id=delete class=subbt2 value='删除' disabled>";
	}
	
	if($formid==0){
		$ads_form=($ads_type==3)?"文字广告":"弹窗(88*31)";
	}else{
		$strtype=($ads_type==4)?"点击":"混合";
		$ads_form=$strtype."(".$arr_adsform[2][$formid]."*".$arr_adsform[3][$formid].")";
	}
	$str_disp.="
		  <tr align=center class=\"listbody\">
            <td>$row[id]</td>
		  	<td align=left><a href=ads_statview.php?adsid=$row[id]>$row[link_tit]</a></td>
            <td>$ads_form</td>
            <td>$subtime</td>
			<td>$cfg_adsstat[$ads_stat]</td>
			<td>$row[totpub]</td>
			<td>$row[spare]</td>
			<td>$row[price]</td>
			<td>$cfg_defstat[$admin_stat]</td>
			<td>$str_manage</td>
	  	  </tr>";
			
}
?>
<script>
<!--
function delads_sub(delid){
	var psub=confirm("确认删除吗?");
	if(psub){
		this.location='ads_stat.php?delid='+delid;
	}else{
		return false;
	}
}
-->
</script>
<table width="1001" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f7f7f7">
  <tr> 
    <td width="200" height="323" valign="top" bgcolor="#E8EEF4"> 
      <?
	include("menu.php");
	?></td>
    <td align="center" valign="top" class="bgconn"> 
    <table width="98%" border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td height="40" class="orange_text"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  
                <td height="30" align="left" valign="middle"><img src="../image/ab5.gif" width="121" height="20"></td>
                </tr>
                <tr>
                  <td height="43" align="center" valign="middle"> 
                    <table width="99%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="20" align="left" valign="middle">&nbsp;&nbsp;&nbsp;&nbsp;您可以在这里查询到您所投放的所有广告项目当前状态及投放剩余数量等。可增加广告项目投放量、修改和删除广告项目。</td>
                      </tr>
					  <tr>
                        
                      <td height="20" align="left" valign="middle">&nbsp;&nbsp;&nbsp;&nbsp;注:修改广告项目后请及时联系我们为您审核。只有"待审"状态中的广告项目可删除,删除后此广告项目剩余金额将加入您的帐户余额。 
                      </td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <tr>
                  <td height="25" align="left" valign="middle"> 
                    <table width="50%" border="0" cellpadding="0" cellspacing="0">
                      <tr align="center" valign="middle">
                        <td width="5%"><img src="../image/bot14.gif" width="16" height="16"></td>
                        <td width="52%" align="left"><a href="message_add.php?tit=当前广告状态"><span class="bluetext">关于本问题给我们留言</span></a></td>
                        <td width="6%"><img src="../image/bot13.gif" width="16" height="16"></td>
                        <td width="37%" align="left"><span class="orange_text">电话:<?=$cfg_phone?></span></td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
          </tr>
		  <tr>
            <td height="4" bgcolor="#556D85" ></td>
          </tr>
		  <tr><td height="3"></td></tr>
        </table>
      <table width="98%" border="0" cellspacing="1" cellpadding="3" class="listtable">
        <tr align="center" class="listbody">
          <td class="listtbhd">ID</td>
          <td class="listtbhd" height="28">项目名称</td>
          <td class="listtbhd">广告规格</td>
          <td class="listtbhd">日期</td>
          <td class="listtbhd">广告<br>状态</td>
          <td class="listtbhd">投放数</td>
          <td class="listtbhd">剩余数</td>
          <td class="listtbhd">单价</td>
          <td class="listtbhd">审核<br>状态</td>
          <td class="listtbhd">管理</td>
        </tr>
        <?=$str_disp?>
      </table>
	  <br>
		<table width="98%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
			<td>
			<?
			  $pagestr="";
			  include("../public/pagefoot.php");
			?></td>
		  </tr>
		</table>
      <p><br>
          <br>
          <br>
          <br>
    </p></td>
  </tr>
</table>
<?
include_once("foot.php");
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -