HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.jwvfm.com/asp/admin.php
<?php
/**
 * Created by xiaoz.
 * User: Administrator
 * Date: 2018-10-8
 * Time: 下午 6:10
 */
include_once 'inc.php';
header("Content-type: text/html; charset=utf-8");
$str = file_get_contents('files/orders.txt');//将整个文件内容读入到一个字符串中
$str_encoding = mb_convert_encoding($str, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5');//转换字符集(编码)
$a1="#(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)<\/br>#";

preg_match_all($a1,$str_encoding,$arr1);





if(!empty($_POST['id'])&& $_POST['xg'] == 0){
    $id= ($_POST['id'] -1);
    $text = file_get_contents('files/orders.txt');
    $a1 = "#(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)<\/br>#";
    preg_match_all($a1, $text, $arr1);
    if (!empty($arr1[0])) {

        if($_POST['ss']==0){
           $abss = 0;
        }else{
            $abss = $arr1[5][$id];
        }
        $arr1[0][$id] = $_POST['weixin']."\t".$_POST['wxname']."\t".$_POST['qq']."\t".$_POST['ss']."\t".$abss."\t".$arr1[6][$id]."</br>";
        foreach ($arr1[0] as $key => $value) {
            $arr1[0][$key] = $arr1[0][$key] . "\r\n";
        }

        file_put_contents('files/orders.txt', $arr1[0]);
    }
    echo"修改成功";
    header('Refresh:0,Url=admin.php');
    echo '3s 后跳转';
}


?>
<!DOCTYPE html>
<html>
<head lang="zh_CN">
    <meta charset="UTF-8">
    <title>客服</title>
</head>
<body>
<h2>添加客服</h2> <a href="tx.php?action=logout">退出登陆</a>
<form method="post" action="processorder.php">
    <label>微信号:</label><input type="text" name="cloths"/>
    <label>微信昵称:</label><input type="text" name="shoes"/>
    <label>qq:</label><input type="text" name="qq"/>
    <label>上线:</label><input type="radio" name="glasses" value="1" checked/>
    <label>下线:</label><input type="radio" name="glasses" value="0"/>
    <input type="submit" value="提交" id="btn1">
</form>
<table  border="1">
    <th>序号</th><th>微信号</th><th>微信名称</th><th>QQ号</th><th>状态</th><th>显示次数</th><th>显示总次数</th><th>操作</th>

        <?php foreach($arr1[1] as $key => $value){?>

    <form method="post">
        <tr>
            <td><input name="id"  readonly="readonly" type="text" value="<?php echo ($key+1) ?>"></td>
            <td><input type="text" name="weixin" value="<?php echo $arr1[1][$key] ?>"></input></td>
            <td><input type="text" name="wxname" value="<?php echo $arr1[2][$key] ?>"></input></td>
            <td><input type="text" name="qq" value="<?php echo $arr1[3][$key] ?>"></input></td>

           <td>上线<input type="radio" name="ss" value="1" <?php if($arr1[4][$key] == 1 ){echo "checked";}?>/>    下线<input type="radio" name="ss" value="0" <?php if($arr1[4][$key] == 0 ){echo "checked";}?>/></td>
            <td><?php echo $arr1[5][$key] ?></td>
            <td><?php echo $arr1[6][$key] ?></td>

            <td><button type="submit" name="xg" value="0">修改</button><a href="del.php?id=<?php echo ($key+1) ?>">删除</a></td>
            </tr>
    </form>
       <?php }?>

</table>
</body>
</html>