} } file_put_contents($datadir . '/ggclzulist.php', $zulist) or die($datadir . '/ggclzulist.php 禁止写入!'); $content = file_get_contents($datadir . '/ggcllist.php'); $array = explode("\r\n", $content); array_shift($array); array_pop($array); foreach ($array as $gid) { $ggcld = insou1(file($datadir . '/' . $gid . '.php')); if ($ggcld[31] == $yggclzu . "\r\n") { $ggcld[31] = $xggclzu . "\r\n"; file_put_contents($datadir . '/' . $gid . '.php', $ggcld); } } } $conn = new mysql(); $conn->inoplog('修改广告策略类/组', ($xggcllei ? $yggcllei . ':' . $xggcllei . '|' : '') . ($xggclzu ? $yggclzu . ':' . $xggclzu : ''), 1, getname()); die('1'); } ////////////////////// if ($menu == 'editdelleizu') { $leiv = insql($_REQUEST['leiv']); $zuv = insql($_REQUEST['zuv']); $newggclleiv = '<?php exit();?>' . "\r\n" . $leiv; file_put_contents($datadir . '/ggclleilist.php', $newggclleiv) or die($datadir . '/ggclleilist.php 禁止写入!'); $newggclzu = '<?php exit();?>' . "\r\n" . $zuv; file_put_contents($datadir . '/ggclzulist.php', $newggclzu) or die($datadir . '/ggclzulist.php 禁止写入!'); $conn = new mysql(); $conn->inoplog('排列/删除广告策略类/组', $leiv . '|' . $zuv, 1, getname()); die('1'); }
$SqlPassword1 = $SqlPassword; } $SqlDataBase1 = rtrim(htmlspecialchars(insql($_POST['SqlDataBase1'])), '\\'); $Pre1 = rtrim(htmlspecialchars(insql($_POST['Pre1'])), '\\'); $amsurl1 = rtrim(htmlspecialchars(insql($_POST['amsurl1'])), '\\'); if ($amsurl1 && strrchr($amsurl1, '/') != '/') { $amsurl1 .= '/'; } $thread1 = rtrim(htmlspecialchars(insql($_POST['thread1'])), '\\'); $clthread1 = rtrim(htmlspecialchars(insql($_POST['clthread1'])), '\\'); $ggwthread1 = rtrim(htmlspecialchars(insql($_POST['ggwthread1'])), '\\'); $timezone1 = rtrim(htmlspecialchars(insql($_POST['timezone1'])), '\\'); $configdata = "<?php\ndefined('IN_NIUXAMS') or exit('Access Denied.');\n\$adname = '{$adname1}';\n\$adpassword = '******';\n\$SqlServer = '{$SqlServer1}';\n\$SqlUserName = '******';\n\$SqlPassword = '******';\n\$SqlDataBase = '{$SqlDataBase1}';\n\$Pre = '{$Pre1}';\n\$amsurl = '{$amsurl1}';\n\$thread = '{$thread1}';\n\$clthread = '{$clthread1}';\n\$ggwthread = '{$ggwthread1}';\n\$timezone = '{$timezone1}';\n"; file_put_contents('config.php', $configdata) or errwin('出错啦!config.php无法修改!请将程序目录和文件的文件权限设置属性0755或0777。'); $conn = new mysql(); $conn->inoplog('修改基本参数', 'cssz', 1, getname()); okwin('恭喜你,修改参数成功了!'); exit; } /////////////////////////// $title = '基本参数设置'; require 'mo.head.php'; ?> <style> .cssz{ border-width:1px 0px 0px 1px; } .left{ border-width:0px 1px 1px 0px; font-size: 1em; line-height: 1.8em;
if (strlen($content1) < 15) { $content1 = '<?php exit();?>' . "\r\n"; } foreach ($arraygid as $gid) { if (strlen($gid) == strlen($ggwthread) + 15) { $path = $datadir . '/' . $gid . '.js'; $path1 = $datadir . '/' . $gid . '.php'; rename($path, $path . 'recycle') or die($gid . ' 删除错误!'); rename($path1, $path1 . 'recycle') or die($gid . ' 删除错误!'); $content = str_replace($gid . "\r\n", '', $content); $content1 .= $gid . "\r\n"; } } file_put_contents($file, $content); file_put_contents($file1, $content1); $conn->inoplog('删除广告位', $gids, 1, getname()); die('1'); } /////////////////////////// if ($menu == 'rebkggw') { if (!$gids) { die('出错啦!gids为空!你让我还原谁?'); } $arraygid = explode(' ', $gids); $file = $datadir . '/ggwlist.php'; $content = file_get_contents($file); $file1 = $datadir . '/ggwrecyclelist.php'; $content1 = file_get_contents($file1); foreach ($arraygid as $gid) { if (strlen($gid) == strlen($ggwthread) + 15) { $path = $datadir . '/' . $gid . '.js';
} else { $ggcon = 'document.write(unescape("' . $ggdm . '"));'; } $ggcon1 = '<?php exit();?>' . "\r\n" . $ggtitle . "\r\n" . $ggdm . "\r\n" . $ggclass . "\r\n" . $ggwidth . "\r\n" . $ggheight . "\r\n" . gnt() . "\r\n" . $ggzu . "\r\n" . $ggtj . "\r\n" . $ggjfclass . "\r\n" . $gglei; file_put_contents($path, $ggcon) or die('出错啦!无法创建.js文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); file_put_contents($path1, $ggcon1) or die('出错啦!无法创建.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); $gglist = file($path2); if (!is_array($gglist)) { $gglist[] = ''; } array_shift($gglist); array_unshift($gglist, $thread . '-' . $ontid . "\r\n"); array_unshift($gglist, '<?php exit();?>' . "\r\n"); file_put_contents($path2, $gglist) or die('出错啦!无法创建.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); $conn = new mysql(); $conn->inoplog('添加广告', $ontid, 1, getname()); die('1'); } /////////////////////////// $ggiftj = $_COOKIE['ggiftj']; $gglei = unescape($_COOKIE['gglei']); $ggzu = unescape($_COOKIE['ggzu']); $ggleil = file_get_contents($datadir . '/ggleilist.php'); $ggll = explode("\r\n", $ggleil); array_shift($ggll); $ggleilist = ''; foreach ($ggll as $value) { if ($value) { if ($value == $gglei) { $ggleilist .= '<option value="' . htmlspecialchars($value) . '" title="' . htmlspecialchars($value) . '" selected="selected">' . htmlspecialchars(cutstr($value, 10)) . '</option>'; } else {
$ggwlei = insql($_POST['ggwlei']); $ggwzu = insql($_POST['ggwzu']); $gid = insql($_POST['gid']); $gtime = insql($_POST['gtime']); if (!$ggwtitle) { die('标题不能为空!'); } require 'func.gg.php'; $path = $datadir . '/' . $gid . '.js'; $path1 = $datadir . '/' . $gid . '.php'; $ggwcon = ggwtojs($gid, $xzggcl, $ggwwidth, $ggwheight, $bjgg, $ggwclass); $ggwcon1 = '<?php exit();?>' . "\r\n" . $gtime . "\r\n" . $ggwtitle . "\r\n" . $ggwclass . "\r\n" . $ggwwidth . "\r\n" . $ggwheight . "\r\n" . $xzggcl . "\r\n" . $bjgg . "\r\n" . $ggwzu . "\r\n" . $ggwlei; file_put_contents($path, $ggwcon) or die('出错啦!无法创建.js文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); file_put_contents($path1, $ggwcon1) or die('出错啦!无法创建.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); $conn = new mysql(); $conn->inoplog('修改广告位', $gid, 1, getname()); die('1'); } /////////////////////////// $ggwleil = file_get_contents($datadir . '/ggwleilist.php'); $ggwll = explode("\r\n", $ggwleil); array_shift($ggwll); $ggwleilist = ''; foreach ($ggwll as $value) { if ($value) { if ($value == $arrayd[8]) { $ggwleilist .= '<option value="' . htmlspecialchars($value) . '" title="' . htmlspecialchars($value) . '" selected="selected">' . htmlspecialchars(cutstr($value, 10)) . '</option>'; } else { $ggwleilist .= '<option value="' . htmlspecialchars($value) . '" title="' . htmlspecialchars($value) . '">' . htmlspecialchars(cutstr($value, 10)) . '</option>'; } }
$path1 = $datadir . '/' . $clthread . '-' . $ontid . '.php'; $path2 = $datadir . '/' . 'ggcllist.php'; $ggclcon = cltojs($gid, $wllx, $clqz, $xzgg, $lhcl, $lhjg, $sjeorne, $sjsz, $xzmrcs, $mrcs, $xzfkcs, $fkcs, $oseorne, $os, $fbleorne, $fbl, $llqeorne, $llq, $yuyeorne, $yuy, $lyeorne, $vly, $urleorne, $url, $diyueorne, $diyu, $jreorne, $jr); $ggclcon1 = '<?php exit();?>' . "\r\n" . gnt() . "\r\n" . $cltitle . "\r\n" . $clsm . "\r\n" . $wllx . "\r\n" . $clqz . "\r\n" . $xzgg . "\r\n" . $lhcl . "\r\n" . $lhjg . "\r\n" . $sjeorne . "\r\n" . $sjsz . "\r\n" . $xzmrcs . "\r\n" . $mrcs . "\r\n" . $xzfkcs . "\r\n" . $fkcs . "\r\n" . $oseorne . "\r\n" . $os . "\r\n" . $fbleorne . "\r\n" . $fbl . "\r\n" . $llqeorne . "\r\n" . $llq . "\r\n" . $yuyeorne . "\r\n" . $yuy . "\r\n" . $lyeorne . "\r\n" . $vly . "\r\n" . $urleorne . "\r\n" . $url . "\r\n" . $diyueorne . "\r\n" . $diyu . "\r\n" . $jreorne . "\r\n" . $jr . "\r\n" . $ggclzu . "\r\n" . $ggcllei; file_put_contents($path, $ggclcon) or die('出错啦!无法创建.js文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); file_put_contents($path1, $ggclcon1) or die('出错啦!无法创建.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); $ggcllist = file($path2); if (!is_array($ggcllist)) { $ggcllist[] = ''; } array_shift($ggcllist); array_unshift($ggcllist, $clthread . '-' . $ontid . "\r\n"); array_unshift($ggcllist, '<?php exit();?>' . "\r\n"); file_put_contents($path2, $ggcllist) or die('出错啦!无法创建.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); $conn = new mysql(); $conn->inoplog('添加广告策略', $gid, 1, getname()); die('1'); } /////////////////////////// $ggcllei = unescape($_COOKIE['ggcllei']); $ggclzu = unescape($_COOKIE['ggclzu']); $ggclleil = file_get_contents($datadir . '/ggclleilist.php'); $ggclll = explode("\r\n", $ggclleil); array_shift($ggclll); $ggclleilist = ''; foreach ($ggclll as $value) { if ($value) { if ($value == $ggcllei) { $ggclleilist .= '<option value="' . htmlspecialchars($value) . '" title="' . htmlspecialchars($value) . '" selected="selected">' . htmlspecialchars(cutstr($value, 10)) . '</option>'; } else { $ggclleilist .= '<option value="' . htmlspecialchars($value) . '" title="' . htmlspecialchars($value) . '">' . htmlspecialchars(cutstr($value, 10)) . '</option>';
$path1 = $datadir . '/ggtemplist.php'; $ggtl = file_get_contents($path1); $ggtl = str_replace($selectggmb . "\r\n", '', $ggtl); file_put_contents($path1, $ggtl) or die('出错啦!无法修改.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); $conn = new mysql(); $conn->inoplog('删除广告模板', $selectggmb, 1, getname()); die('1'); ///////////////////// } elseif ($_REQUEST['menu'] == 'renewitem') { ///////////////////// $itemlist = htmlspecialchars(insql($_REQUEST['itemlist'])); $path1 = $datadir . '/ggtemplist.php'; $ggtl = '<?php exit();?>' . "\r\n" . $itemlist; file_put_contents($path1, $ggtl) or die('出错啦!无法修改.php文件!请将程序目录和所有文件的文件权限设置属性0755或0777。'); $conn = new mysql(); $conn->inoplog('排序广告模板', $itemlist, 1, getname()); die('1'); ///////////////////// } else { ///////////////////// $ggtl = file_get_contents($datadir . '/ggtemplist.php'); $ggtla = explode("\r\n", $ggtl); array_shift($ggtla); array_pop($ggtla); $ggtemp_list = ''; $ggtemp_sortable = ''; foreach ($ggtla as $key => $value) { if ($value && file_exists($datadir . '/' . $value . '.php')) { $mbnr = file($datadir . '/' . $value . '.php'); array_shift($mbnr); $mbsm = htmlspecialchars(rtrim(array_shift($mbnr)));
$yhznr = '<?php exit();?>' . "\r\n" . $yhzname . "\r\n" . $funcselect; file_put_contents($rankfile, $yhznr) or die('出错啦!' . $rankfile . ' 无法修改!请将程序目录和文件的文件权限设置属性0755或0777。'); $conn = new mysql(); $conn->inoplog('修改用户组', $rank, 1, getname()); die('1'); ///////////////////// } elseif ($_REQUEST['menu'] == 'delyhz') { ///////////////////// $rank = htmlspecialchars(insql($_REQUEST['rank'])); $rankfile = $datadir . '/access/' . $rank . '.access.php'; if (!is_file($rankfile)) { die('用户组 ' . $rank . ' 不存在,删除失败!'); } unlink($rankfile) or die('出错啦!' . $rankfile . ' 无法删除!请将程序目录和文件的文件权限设置属性0755或0777。'); $conn = new mysql(); $conn->inoplog('删除用户组', $rank, 1, getname()); die('1'); ///////////////////// } else { ///////////////////// $subadminlist = ''; foreach ($subadmin as $key => $value) { $accessdata = file($datadir . '/access/' . $value[1] . '.access.php'); array_shift($accessdata); $zuname = htmlspecialchars(rtrim(array_shift($accessdata))); $subadminlist .= '<tr class="list">'; $subadminlist .= '<td class="ui-widget-content uitd ct">' . htmlspecialchars($key) . '</td>'; $subadminlist .= '<td class="ui-widget-content uitd ct">' . $zuname . '</td>'; $subadminlist .= '<td class="ui-widget-content uitd ct"><button type="button" class="button editsa" value="' . htmlspecialchars($value[1]) . '" title="修改此管理员属性" />修改</button> <button type="button" class="button delsa" value="' . htmlspecialchars($key) . '" title="删除此管理员" />删除</button></td>'; $subadminlist .= '</tr>'; }
//////////////////////////// if ($menu == 'deluploadfile') { $fids = insql($_POST['fids']); if (!$fids) { die('出错啦!目标为空!你让我删谁?'); } $dir = $datadir . '/updata/'; $arrayfid = explode(' ', $fids); foreach ($arrayfid as $fid) { $fidclass = explode('.', $fid); if (is_numeric($fidclass[0]) && strlen($fidclass[0]) == 14) { unlink($dir . $fid) or die($fid . "删除错误!请确认属性是否设置正确!"); } } $conn = new mysql(); $conn->inoplog('删除上传广告文件', $fids, 1, getname()); die('1'); } //////////////////////////// $desc = insql($_REQUEST['desc']); $limit = insql($_REQUEST['limit']); $page = insql($_REQUEST['page']); $desc = $desc ? '' : 'DESC'; $limit = is_numeric($limit) && $limit > 1 ? $limit : 30; $page = is_numeric($page) && $page > 1 ? $page : 1; $upath = $datadir . '/updata'; $upurl = $amsurl . $upath; $files = getfiles($upath); if ($desc) { rsort($files); } else {