<?php

class mm
{
    function aa($value1, $value2)
    {
        $string = file_get_contents("data/paper.json");
        $j = json_decode($string, true);
        echo json_encode($j[$value2][$value1]);
    }
}
$m1 = new mm();
$m1->aa($_POST['coun'], $_POST['token']);
Example #2
0
                echo 1;
            } else {
                echo -1;
            }
        } else {
            echo -1;
        }
    }
    function aa1($value1, $value2)
    {
        $string = file_get_contents("data/teach.json");
        $j = json_decode($string, true);
        if (array_key_exists($value1, $j)) {
            if ($j[$value1] == $value2) {
                echo 1;
            } else {
                echo -1;
            }
        } else {
            echo -1;
        }
    }
}
if (isset($_POST['uid'])) {
    $m1 = new mm();
    if ($_POST['t'] == 0) {
        $m1->aa($_POST['uid'], $_POST['pwd']);
    } else {
        $m1->aa1($_POST['uid'], $_POST['pwd']);
    }
}
Example #3
0
<?php

class mm
{
    function aa($value1, $value2, $value3)
    {
        $string = file_get_contents("data/regis.json");
        $j = json_decode($string, true);
        if (array_key_exists($value3, $j)) {
            $string = file_get_contents("data/clasdi.json");
            $j = json_decode($string, true);
            if (count($j[$value1][$value2]['names']) == 0) {
                $j[$value1][$value2]['names'] = [];
            }
            if (array_search($value3, $j[$value1][$value2]['names']) === FALSE) {
                array_push($j[$value1][$value2]['names'], $value3);
                $string = json_encode($j);
                file_put_contents("data/clasdi.json", $string);
            }
        } else {
            //echo -100;
        }
    }
}
$m1 = new mm();
$m1->aa($_POST['uid'], $_POST['subject'], $_POST['studn']);
Example #4
0
                }
            }
            $koko = 0;
            for ($abc = 0; $abc < count($j33); $abc++) {
                if ($j33[$abc]['count'] > $koko) {
                    $koko = $j33[$abc]['count'];
                    $konam1 = $j33[$abc]['name'];
                }
            }
            $naba = json_encode($j33);
            file_put_contents("data/friend.json", $naba);
            $a3 = array();
            array_push($a3, $send);
            if ($a3[0] == 1) {
                array_push($a3, $j['paging']['next']);
            } else {
                array_push($a3, -1);
            }
            array_push($a3, $konam1);
            echo json_encode($a3);
        }
    }
}
$val1 = $_POST['bb'];
$val2 = $_POST['ro'];
$m1 = new mm();
if ($val2 == "stats" || $val2 == "pic") {
    $m1->f1($val1, $val2);
} else {
    $m1->f2($val1, $val2);
}